Skip to content

Commit

Permalink
Remove multimodule setup
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-arold committed Nov 30, 2018
1 parent 0dad9e9 commit 3c0a900
Show file tree
Hide file tree
Showing 103 changed files with 113 additions and 3,830 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# Caves of Zircon

A roguelike tutorial project using Zircon which is a spiritual successor of Caves of Clojure and Trystan's roguelike tutorial.
## Usage

You need to install *Java* (JDK) on your computer before you can build Caves of Zircon.
Alternatively you can use one of the releases [here](https://github.com/Hexworks/caves-of-zircon/releases) for
which a JRE will suffice.

```java
git clone https://github.com/Hexworks/caves-of-zircon.git
cd caves-of-zircon
./gradlew clean build
java -jar build/libs/caves-of-zircon-2018.1.0-PREVIEW.jar
```

## Tutorial notes

- Explain why components are objects -> why immutability is good
- Explain `reified`
- Improve destructuring (property name is at end, custom fields at front)
- Explain extension functions over `Entity` and others and their purpose
- Events with `EventBus` (remove entity)
- Explain `data class`es (destructuring the event)
- Introduce databinding (cobalt)
- Add `sameLevelNeighbors` and explain the utility of extension functions
- Introduce tile variations
- Explain why using functions is better than variables (`FLOOR` TO `floor()` when `Variation` is added)
- Introduce extension functions on nullable types
127 changes: 88 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,47 +1,96 @@
allprojects {
group "org.hexworks.cavesofzircon"
version "2018.1.0-PREVIEW"

buildscript {
ext.kotlinVersion = "1.3.10"
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

ext {
zirconVersion = "2018.5.32-PREVIEW"
junitVersion = "4.12"
mockitoVersion = "1.10.19"
assertjVersion = "3.6.2"
slf4jVersion = "1.7.25"
cobaltVersion = "2018.0.14-BETA"

libraries = [
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
slf4j_api : "org.slf4j:slf4j-api:$slf4jVersion",
slf4j_simple : "org.slf4j:slf4j-simple:$slf4jVersion",
cobalt_databinding: "org.hexworks.cobalt:cobalt.databinding-jvm:$cobaltVersion",
zircon_core : "org.hexworks.zircon:zircon.core-jvm:$zirconVersion",
zircon_swing : "org.hexworks.zircon:zircon.jvm.swing:$zirconVersion",
junit : "junit:junit:$junitVersion",
mockito : "org.mockito:mockito-all:$mockitoVersion",
assertj : "org.assertj:assertj-core:$assertjVersion"
]
}
group "org.hexworks.cavesofzircon"
version "2018.1.0-PREVIEW"

buildscript {
ext.kotlinVersion = "1.3.10"
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.2"
}
}

ext {
zirconVersion = "2018.5.32-PREVIEW"
junitVersion = "4.12"
mockitoVersion = "1.10.19"
assertjVersion = "3.6.2"
slf4jVersion = "1.7.25"
cobaltVersion = "2018.0.14-BETA"

libraries = [
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
slf4j_api : "org.slf4j:slf4j-api:$slf4jVersion",
slf4j_simple : "org.slf4j:slf4j-simple:$slf4jVersion",
cobalt_databinding: "org.hexworks.cobalt:cobalt.databinding-jvm:$cobaltVersion",
zircon_core : "org.hexworks.zircon:zircon.core-jvm:$zirconVersion",
zircon_swing : "org.hexworks.zircon:zircon.jvm.swing:$zirconVersion",
junit : "junit:junit:$junitVersion",
mockito : "org.mockito:mockito-all:$mockitoVersion",
assertj : "org.assertj:assertj-core:$assertjVersion"
]
}

repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}

apply plugin: 'kotlin'
apply plugin: "com.github.johnrengelman.shadow"

configurations {
shadow
compile.extendsFrom provided
provided.extendsFrom shadow
}

shadowJar {
classifier = null
version = version
}

artifacts {
archives shadowJar
}

jar {
manifest {
attributes 'Main-Class': "org.hexworks.cavesofzircon.MainKt"
}
}

build.dependsOn(shadowJar)

dependencies {
compile libraries.kotlin_stdlib
compile libraries.kotlin_reflect

compile libraries.slf4j_api

compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'ch.qos.logback:logback-core:1.2.3'

compile libraries.cobalt_databinding
compile libraries.zircon_core
compile libraries.zircon_swing

testCompile libraries.junit
testCompile libraries.mockito
testCompile libraries.assertj
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

15 changes: 0 additions & 15 deletions caves-of-zircon.java/build.gradle

This file was deleted.

34 changes: 0 additions & 34 deletions caves-of-zircon.java/src/main/java/rltut/Main.java

This file was deleted.

13 changes: 0 additions & 13 deletions caves-of-zircon.java/src/main/java/rltut/ai/BatAi.java

This file was deleted.

Loading

0 comments on commit 3c0a900

Please sign in to comment.