diff --git a/build.gradle.kts b/build.gradle.kts index a510b88f..b1724ae2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -306,3 +306,78 @@ tasks.dokka { tasks.wrapper { distributionType = Wrapper.DistributionType.ALL } + +configure(project(":nonfree").subprojects) { + plugins.withType { + dependencies { + val annotationProcessor by configurations + annotationProcessor(project(":deob-processor")) + + val compileOnly by configurations + compileOnly(project(":deob-annotations")) + } + + tasks.named("compileJava") { + options.compilerArgs = listOf("-Amap=${project.rootDir}/share/deob-map/${project.name}.yaml") + } + } +} + +project(":nonfree") { + apply(plugin = "base") +} + +project(":nonfree:client") { + apply(plugin = "application") + + configure { + mainClassName = "client" + } + + tasks.named("run") { + args("1", "live", "en", "game0") + } + + plugins.withType { + dependencies { + val implementation by configurations + implementation(project(":nonfree:gl")) + implementation(project(":nonfree:signlink")) + } + } +} + +project(":nonfree:gl") { + apply(plugin = "java-library") +} + +project(":nonfree:loader") { + apply(plugin = "java") + + plugins.withType { + dependencies { + val implementation by configurations + implementation(project(":nonfree:signlink")) + implementation(project(":nonfree:unpack")) + } + } +} + +project(":nonfree:signlink") { + apply(plugin = "java-library") +} + +project(":nonfree:unpack") { + apply(plugin = "java-library") +} + +project(":nonfree:unpackclass") { + apply(plugin = "java-library") + + plugins.withType { + dependencies { + val implementation by configurations + implementation(project(":nonfree:unpack")) + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 11032624..a75bb57e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,3 @@ -import java.nio.file.Files - rootProject.name = "openrs2" include( @@ -19,18 +17,13 @@ include( "deob-map", "deob-processor", "game", + "nonfree", + "nonfree:client", + "nonfree:gl", + "nonfree:loader", + "nonfree:signlink", + "nonfree:unpack", + "nonfree:unpackclass", "util", "yaml" ) - -if (Files.exists(rootProject.projectDir.toPath().resolve("nonfree/build.gradle.kts"))) { - include( - "nonfree", - "nonfree:client", - "nonfree:gl", - "nonfree:loader", - "nonfree:signlink", - "nonfree:unpack", - "nonfree:unpackclass" - ) -}