-
-
Save Frontrider/60f830de511cd087defe16f8c42d03a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
kotlin("jvm") version "1.4.32" | |
id("com.utopia-rise.godot-kotlin-jvm") version "0.2.0-3.3.0" | |
id("org.beryx.jlink") version "2.23.8" | |
} | |
repositories { | |
mavenCentral() | |
} | |
val moduleName by extra("skyforge") | |
dependencies { | |
implementation("com.scalified:tree:0.2.5") | |
// https://mvnrepository.com/artifact/com.google.code.gson/gson | |
//implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") | |
//https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core | |
implementation(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = "2.12.3") | |
implementation("org.junit.jupiter:junit-jupiter:5.7.0") | |
kotlin("stdlib") | |
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.5.2") | |
testImplementation("org.junit.platform:junit-platform-runner:1.5.2") | |
} | |
godot { | |
isAndroidExportEnabled.set(false) | |
dxToolPath.set("dx") | |
} | |
tasks { | |
// Use the built-in JUnit support of Gradle. | |
test { | |
useJUnitPlatform() | |
} | |
jar { | |
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | |
} | |
val scope = this | |
compileKotlin { | |
doFirst { | |
destinationDir =(scope.getAt("compileJava") as JavaCompile).destinationDir | |
} | |
} | |
compileJava { | |
inputs.property("moduleName", moduleName) | |
doFirst { | |
options.compilerArgs = listOf( | |
"--module-path", classpath.asPath, | |
"--patch-module", "$moduleName=${sourceSets["main"].output.asPath}" | |
) | |
classpath = files() | |
} | |
} | |
} | |
jlink { | |
this.addOptions("-add-modules", "java.base,java.logging,java.sql,kotlin.stdlib,godot.library,tree", "--output jre","--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages","--main-class","hu.frontrider.skyforge.MainKt") | |
launcher{ | |
name = "skyforge" | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module skyforge.main { | |
requires kotlin.stdlib; | |
requires godot.library; | |
requires tree; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13:38:07: Executing task 'build'... | |
> Task :compileKotlin | |
w: /home/frontrider/IdeaProjects/skyforge/src/main/kotlin/hu/frontrider/skyforge/model/RecipeManager.kt: (45, 18): Parameter 'item' is never used | |
w: /home/frontrider/IdeaProjects/skyforge/src/main/kotlin/hu/frontrider/skyforge/model/RecipeManager.kt: (45, 30): Parameter 'model' is never used | |
w: /home/frontrider/IdeaProjects/skyforge/src/main/kotlin/hu/frontrider/skyforge/model/RecipeManager.kt: (45, 47): Parameter 'start' is never used | |
> Task :compileJava FAILED | |
> Task :processResources UP-TO-DATE | |
3 actionable tasks: 2 executed, 1 up-to-date | |
error: the unnamed module reads package godot.annotation from both godot.library and godot.runtime | |
error: module godot.runtime reads package godot.annotation from both godot.library and godot.runtime | |
error: module kotlin.stdlib.common reads package godot.annotation from both godot.library and godot.runtime | |
error: module annotations reads package godot.annotation from both godot.library and godot.runtime | |
error: module tree reads package godot.annotation from both godot.library and godot.runtime | |
error: module godot.library reads package godot.annotation from both godot.library and godot.runtime | |
/home/frontrider/IdeaProjects/skyforge/src/main/java/module-info.java:1: error: module skyforge.main reads package godot.annotation from both godot.library and godot.runtime | |
module skyforge.main { | |
^ | |
7 errors | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Execution failed for task ':compileJava'. | |
> Compilation failed; see the compiler error output for details. | |
* Try: | |
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. | |
* Get more help at https://help.gradle.org | |
BUILD FAILED in 1s | |
13:38:09: Task execution finished 'build'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment