Init modules
This commit is contained in:
parent
066bdb8127
commit
dcdba51f14
29
api/build.gradle.kts
Normal file
29
api/build.gradle.kts
Normal file
|
|
@ -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<MavenPublication>("mavenJava") {
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories{
|
||||||
|
maven {
|
||||||
|
name = "maven"
|
||||||
|
url = uri("https://repo.destro.xyz/snapshots")
|
||||||
|
credentials(PasswordCredentials::class)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,46 +1,29 @@
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("com.github.johnrengelman.shadow") version "7.1.0"
|
id("com.github.johnrengelman.shadow") version "7.1.0"
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.alttd"
|
allprojects {
|
||||||
version = "1.0.0-SNAPSHOT"
|
group = "com.alttd"
|
||||||
description = "Altitude DataLock Library."
|
// version = "1.0.0-SNAPSHOT"
|
||||||
|
description = "Altitude DataLock Library."
|
||||||
|
}
|
||||||
|
|
||||||
apply<JavaLibraryPlugin>()
|
subprojects {
|
||||||
|
apply<JavaLibraryPlugin>()
|
||||||
|
apply(plugin = "maven-publish")
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(17))
|
languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<JavaCompile> {
|
jar {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
enabled = false
|
||||||
}
|
|
||||||
|
|
||||||
withType<Javadoc> {
|
|
||||||
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<ConfigureShadowRelocation>("relocateJars") {
|
|
||||||
target = shadowJar.get()
|
|
||||||
prefix = "${project.name}.lib"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,4 +45,4 @@ publishing {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT")
|
compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
plugin/build.gradle.kts
Normal file
22
plugin/build.gradle.kts
Normal file
|
|
@ -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)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
rootProject.name = "DataLockLib"
|
rootProject.name = "DataLockLib"
|
||||||
|
|
||||||
|
include(":api")
|
||||||
|
include(":plugin")
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user