An overview of Gradle's build.gradle.kts
Background and beginning
If you read my previous post, you know that I recently spent a good deal of time debugging a Java build of a program. Not a bug in the Java code, but a bug in gradle, my build environment. Specifically, in my gradle build file: build.gradle.kts.
After going through that problem, I spent time, finally, not pursuing more programming, but learning how gradle’s build operated instead. So, this is a summary of that learning. Sorry, it’s going to be a bit long. But, first, I need to take a minute to go over background things so that we are all on the same page. If you read my post about writing and compiling a Hello World! program in C and in Java , you will know what a basic Java program looks like. You will also see that, in theory, you can compile a Java class with javac MyMain.java into a program.
Learning Gradle
A sleeping build time bug arises
I haven’t written in a while. Sorry. It’s hot here and I’ve been spending extra time working on the adventure game . I sat down to start writing some of the unit tests for the game. I wanted to do one simple one and test to see if everything built and tested correctly. I always do things in code incrementally; a little at a time and test. Sometimes, it seems pedantic, but it pays off. Though it was not expected to fail, JUnit pushed a failure during testing that hadn’t been there when no tests were available.
Refactoring sometimes creates issues
Not as expected
I didn’t get much accomplished this weekend on my adventure game. While I did manage to get a ContainerThing class created, the next step kind of failed miserably.
ContainerThing was added as a descendent of the Thing:w
class so that we can have chests and sacks; things that have to be opened and closed before user access. That all went pretty well. I did have to adapt to using instanceof in order to access the isOpenable field and the open() and close() methods. But it worked out.
Hello World in C and Java
First steps in programming
Now, that we have all the background covered, I want to show you the beginnings of programming. I will be showing you the steps to build and run the ubiquitous “Hello World” program in both C and Java. The C version will use the C99 standard ( though it matches most standards as well ) and the Java version will use Java 17 ( though it will likely run in whichever Java you have ). These two language standards will be where I will work as I write more posts.
a new beginning
A New Beginning - Again
Hi, I am tardis1 and, yes, I am a Whovian, but I am also many other things as well.
Yes, this is a new beginning for the TARDIS Server Project. I have made several of these over the years, but they all lacked something. Maybe this time will be different.
I grew up as a child during the Gemini and Apollo space flights. Like many others of that era, I wanted to be an astronaut. However, my poor vision ruined that by the time I was a teenager. Yet, there were still space things I could participate in. One of those was computers.