mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-26 12:51:29 -08:00
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.
This commit is contained in:
@@ -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"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user