diff --git a/.gitignore b/.gitignore index 95770c4..47a67e7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ todo.txt testMazes/ build/ +releases/ .idea/ .gradle/ - -META-INF/ -launch4j-config.xml diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/build.gradle b/build.gradle index 03d08b6..d9cd66a 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ buildscript { ext { kotlinVersion = "1.3.31" junitVersion = "5.4.2" + mazegenVersion = "1.1.0" } repositories { mavenCentral() @@ -13,6 +14,7 @@ buildscript { } apply plugin: "kotlin" +apply plugin: "idea" repositories { mavenCentral() @@ -20,6 +22,22 @@ repositories { maven { url { "https://oss.sonatype.org/content/repositories/snapshots/"}} } +idea { + module { + outputDir file("build/classes/main") + testOutputDir file("build/classes/test") + } +} + +sourceSets.main.java.srcDirs = ["src/main/kotlin"] +sourceSets.test.java.srcDirs = ["src/test/kotlin"] +project.buildDir = "build/" + +java { + sourceCompatibility = JavaVersion.VERSION_1_6 + targetCompatibility = JavaVersion.VERSION_1_6 +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion" @@ -30,11 +48,26 @@ dependencies { testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion" } -sourceSets.main.java.srcDirs = ["src/main/kotlin"] -sourceSets.test.java.srcDirs = ["src/test/kotlin"] -buildDir = "build/" -java { - sourceCompatibility = JavaVersion.VERSION_1_6 - targetCompatibility = JavaVersion.VERSION_1_6 +task fatJar(type: Jar) { + manifest { + attributes 'Main-Class': 'com.maltaisn.mazegen.MainKt' + } + from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } + with jar +} + +task releaseZip(type: Zip) { + dependsOn fatJar + from(project.rootDir) { + include "mazegen.bat" + include "README.md" + include "CHANGELOG.md" + include "LICENSE" + } + from("build/libs/") { + include "mazegen.jar" + } + archiveName "releases/mazegen-${mazegenVersion}.zip" + destinationDirectory = project.rootDir } diff --git a/config.json b/config.json index b9b1ed0..5dcb115 100644 --- a/config.json +++ b/config.json @@ -1,9 +1,9 @@ { "mazes": [ { - "name": "zeta_big", - "type": "zeta", - "size": 60, + "name": "orthogonal", + "type": "orthogonal", + "size": 30, "distanceMap": true, "distanceMapStart": ["S", "S"] } @@ -11,10 +11,5 @@ "output": { "format": "png", "path": "testMazes/" - }, - "style": { - "cellSize": 10, - "strokeWidth": 2, - "distanceMapColors": ["#ffffe0","#ffd298","#ffa574","#f67863","#e04c54","#bd1f38","#8b0000"] } } diff --git a/gradle.properties b/gradle.properties index db44b3e..ff329ac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms128m -Xmx1500m -org.gradle.configureondemand=false \ No newline at end of file +org.gradle.configureondemand=false diff --git a/mazegen.bat b/mazegen.bat new file mode 100644 index 0000000..cf21df4 --- /dev/null +++ b/mazegen.bat @@ -0,0 +1,3 @@ +@echo off +java -jar mazegen.jar %* +pause \ No newline at end of file