diff --git a/api/build.gradle.kts b/api/build.gradle.kts new file mode 100644 index 0000000..af398e7 --- /dev/null +++ b/api/build.gradle.kts @@ -0,0 +1,29 @@ +plugins { + `maven-publish` +} + +dependencies { + compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT") +} + +tasks { + jar { + enabled = false + } +} + +publishing { + publications { + create("mavenJava") { + from(components["java"]) + } + } + + repositories{ + maven { + name = "maven" + url = uri("https://repo.destro.xyz/snapshots") + credentials(PasswordCredentials::class) + } + } +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index f5cdb07..d9153ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,46 +1,29 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation - plugins { id("java") id("com.github.johnrengelman.shadow") version "7.1.0" id("maven-publish") } -group = "com.alttd" -version = "1.0.0-SNAPSHOT" -description = "Altitude DataLock Library." +allprojects { + group = "com.alttd" +// version = "1.0.0-SNAPSHOT" + description = "Altitude DataLock Library." +} -apply() +subprojects { + apply() + apply(plugin = "maven-publish") -java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) + java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } } } tasks { - withType { - options.encoding = Charsets.UTF_8.name() - } - - withType { - options.encoding = Charsets.UTF_8.name() - } - - shadowJar { - dependsOn(getByName("relocateJars") as ConfigureShadowRelocation) - archiveFileName.set("${project.name}-${project.version}.jar") - minimize() - configurations = listOf(project.configurations.shadow.get()) - } - - build { - dependsOn(shadowJar) - } - - create("relocateJars") { - target = shadowJar.get() - prefix = "${project.name}.lib" + jar { + enabled = false } } @@ -62,4 +45,4 @@ publishing { dependencies { compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT") -} \ No newline at end of file +} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts new file mode 100644 index 0000000..28551f1 --- /dev/null +++ b/plugin/build.gradle.kts @@ -0,0 +1,22 @@ +plugins { + `maven-publish` + id("com.github.johnrengelman.shadow") + id("xyz.jpenilla.run-paper") version "1.0.6" +} + +dependencies { + implementation(project(":api")) // API + compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT") // Galaxy +} + +tasks { + + shadowJar { + archiveFileName.set("${rootProject.name}-${project.version}.jar") + } + + build { + dependsOn(shadowJar) + } + +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 5872558..878f597 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,8 @@ rootProject.name = "DataLockLib" +include(":api") +include(":plugin") + dependencyResolutionManagement { repositories { mavenCentral()