Skip to content

Commit a786272

Browse files
Adam AroldAdam Arold
authored andcommitted
Add project skeleton
1 parent c5f063f commit a786272

10 files changed

Lines changed: 304 additions & 2 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/.gradle
2+
**/build/
3+
**/logs/
4+
**/!gradle/wrapper/gradle-wrapper.jar
5+
**/out/
6+
**/.idea
7+
**/*.iws
8+
**/*.iml
9+
**/*.ipr
10+
**/node_modules/
11+
**/.DS.Store

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# caves-of-zircon-tutorial
2-
Caves of Zircon tutorial project which can be used to follow through with the tutorial.
1+
# Caves of Zircon Tutorial
2+
3+
This project is part of the [How to Make a Roguelike](https://hexworks.org/posts/tutorials/2018/11/04/how-to-make-a-roguelike.html)
4+
tutorial. Check out the article series if you want to make the most ouf of this project.

build.gradle

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
buildscript {
2+
repositories {
3+
mavenLocal()
4+
mavenCentral()
5+
jcenter()
6+
maven { url "https://plugins.gradle.org/m2/" }
7+
}
8+
dependencies {
9+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10+
classpath "com.github.jengelman.gradle.plugins:shadow:$shadow_version"
11+
}
12+
}
13+
14+
repositories {
15+
mavenLocal()
16+
mavenCentral()
17+
jcenter()
18+
maven { url 'https://jitpack.io' }
19+
}
20+
21+
apply plugin: 'kotlin'
22+
apply plugin: "com.github.johnrengelman.shadow"
23+
24+
configurations {
25+
shadow
26+
compile.extendsFrom provided
27+
provided.extendsFrom shadow
28+
}
29+
30+
shadowJar {
31+
classifier = null
32+
version = null
33+
}
34+
35+
artifacts {
36+
archives shadowJar
37+
}
38+
39+
jar {
40+
manifest {
41+
attributes 'Main-Class': "org.hexworks.cavesofzircon.MainKt"
42+
}
43+
}
44+
45+
build.dependsOn(shadowJar)
46+
47+
dependencies {
48+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
49+
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
50+
51+
implementation "org.slf4j:slf4j-api:$slf4j_version"
52+
53+
implementation 'ch.qos.logback:logback-classic:1.2.3'
54+
implementation 'ch.qos.logback:logback-core:1.2.3'
55+
56+
implementation "org.hexworks.cobalt:cobalt.databinding-jvm:$cobalt_version"
57+
implementation "org.hexworks.amethyst:amethyst.core-jvm:$amethyst_version"
58+
implementation "org.hexworks.zircon:zircon.core-jvm:$zircon_version"
59+
implementation "org.hexworks.zircon:zircon.jvm.swing:$zircon_version"
60+
61+
testCompile "junit:junit:$junit_version"
62+
testCompile "org.mockito:mockito-all:$mockito_version"
63+
testCompile "org.assertj:assertj-core:$assertj_version"
64+
}
65+
66+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
67+
kotlinOptions {
68+
jvmTarget = "1.8"
69+
}
70+
}
71+

gradle.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
org.gradle.caching=true
2+
org.gradle.parallel=true
3+
org.gradle.jvmargs=-Xmx2048M
4+
org.gradle.daemon=true
5+
6+
group=org.hexworks.cavesofzircon
7+
version=2018.1.0-PREVIEW
8+
9+
kotlin_version=1.3.11
10+
shadow_version=4.0.2
11+
12+
cobalt_version=2018.1.0-PREVIEW
13+
amethyst_version=2019.0.1-PREVIEW
14+
zircon_version=2019.0.7-PREVIEW
15+
junit_version=4.12
16+
mockito_version=1.10.19
17+
assertj_version=3.6.2
18+
slf4j_version=1.7.25

gradle/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "caves-of-zircon"
6 KB
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.hexworks.cavesofzircon
2+
3+
import org.hexworks.zircon.api.ColorThemes
4+
import org.hexworks.zircon.api.Components
5+
import org.hexworks.zircon.api.Screens
6+
import org.hexworks.zircon.api.SwingApplications
7+
import org.hexworks.zircon.api.component.ComponentAlignment
8+
9+
@Suppress("ConstantConditionIf")
10+
fun main(args: Array<String>) {
11+
12+
val grid = SwingApplications.startTileGrid()
13+
val screen = Screens.createScreenFor(grid)
14+
15+
screen.addComponent(Components.header()
16+
.withText("Hello, from Caves of Zircon!")
17+
.withAlignmentWithin(screen, ComponentAlignment.CENTER))
18+
19+
screen.applyColorTheme(ColorThemes.arc())
20+
screen.display()
21+
22+
}

0 commit comments

Comments
 (0)