From 2198824182d4faee2a58f5a342ef69335220cfb8 Mon Sep 17 00:00:00 2001 From: Paul Holt Date: Mon, 24 Jan 2022 00:28:45 +1100 Subject: [PATCH] Missed two kotlin classes - 01 kotlin/aceyducey.kt - 85 kotlin/Synonym.kt Move repository declaration and plugins in into main build.gradle.kts. All subproject build.gradle files are now much smaller, and identical. --- buildJvm/README.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/buildJvm/README.md b/buildJvm/README.md index e2b9da0b..4ecba004 100644 --- a/buildJvm/README.md +++ b/buildJvm/README.md @@ -10,7 +10,7 @@ Build all the games: ./gradlew -q clean assemble installDist distributeBin distributeLib ``` -Then, run a game +Then, run a game: ### Mac or linux: ```shell @@ -56,21 +56,17 @@ local clone to point to your new forked project. ## Adding a new game These are build scripts for all JVM games contributed so far. -New games can be added by: -- Creating a `build_NUMBER_NAME_[java/kotlin]` directory -- Adding a `build.gradle` file to that directory. -All `build.gradle` files under `build_NUMBER_*` should be nearly identical, unless -there is some special requirement. -- Adding a `gradle.properties` file to that directory, defining the source +New games can be added: +- Create a new `build_NUMBER_NAME_[java/kotlin]` directory +- Add a `build.gradle` file to that directory. +All `build.gradle` files under `build_NUMBER_*` are identical. +- Add a `gradle.properties` file to that directory, defining the source directory for the java or kotlin file, and the class that contains the `main` method. +- Add an entry in `settings.gradle` -The `build.gradle` file will normally be identical to this: +The `build.gradle` file **should** be identical to all the other `build.gradle` files +in all the other subprojects: ```groovy - plugins { - id 'application' - // id 'org.jetbrains.kotlin.jvm' // UNCOMMENT for kotlin projects - } - sourceSets { main { java { @@ -78,19 +74,21 @@ The `build.gradle` file will normally be identical to this: } } } - - repositories { - mavenCentral() - } - application { mainClass = gameMain } ``` -And the `gradle.properties` file should look like this: +The `gradle.properties` file should look like this: gameSource=91_Train/java/src gameMain=Train where `gameSource` is the root of the source code directory, and `gameMain` is the main class. + +The `settings.gradle` must be maintained as a list of all subprojects. Add your new +project to the list. + +```groovy +include ":build_91_Train_java" +```