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 {
|
||||
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<JavaLibraryPlugin>()
|
||||
subprojects {
|
||||
apply<JavaLibraryPlugin>()
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
java {
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
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"
|
||||
jar {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
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"
|
||||
|
||||
include(":api")
|
||||
include(":plugin")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user