build: Improved build organization with gradle plugins
This commit is contained in:
parent
536ed9e4c1
commit
04e430466f
@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
alias(libs.plugins.indra)
|
alias(libs.plugins.indra)
|
||||||
|
id("authmevelocity.publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@ -24,43 +25,3 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
indra {
|
|
||||||
javaVersions {
|
|
||||||
testWith().add(17)
|
|
||||||
}
|
|
||||||
|
|
||||||
issues {
|
|
||||||
url("https://github.com/4drian3d/AuthMeVelocity/issues")
|
|
||||||
system("Github Issues")
|
|
||||||
}
|
|
||||||
|
|
||||||
github("4drian3d", "AuthMeVelocity") {
|
|
||||||
ci(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
gpl3OrLaterLicense()
|
|
||||||
|
|
||||||
scm {
|
|
||||||
connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git")
|
|
||||||
developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git")
|
|
||||||
url("http://github.com/4drian3d/AuthMeVelocity/")
|
|
||||||
}
|
|
||||||
|
|
||||||
configurePublications {
|
|
||||||
groupId = project.group as String
|
|
||||||
artifactId = "api-paper"
|
|
||||||
version = project.version as String
|
|
||||||
from(components["java"])
|
|
||||||
|
|
||||||
pom {
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id.set("4drian3d")
|
|
||||||
name.set("Adrian")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
alias(libs.plugins.indra)
|
alias(libs.plugins.indra)
|
||||||
|
id("authmevelocity.publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -24,42 +25,3 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
indra {
|
|
||||||
javaVersions {
|
|
||||||
testWith().add(17)
|
|
||||||
}
|
|
||||||
|
|
||||||
issues {
|
|
||||||
url("https://github.com/4drian3d/AuthMeVelocity/issues")
|
|
||||||
system("Github Issues")
|
|
||||||
}
|
|
||||||
|
|
||||||
github("4drian3d", "AuthMeVelocity") {
|
|
||||||
ci(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
gpl3OrLaterLicense()
|
|
||||||
|
|
||||||
scm {
|
|
||||||
connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git")
|
|
||||||
developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git")
|
|
||||||
url("http://github.com/4drian3d/AuthMeVelocity/")
|
|
||||||
}
|
|
||||||
|
|
||||||
configurePublications {
|
|
||||||
groupId = project.group as String
|
|
||||||
artifactId = "api-velocity"
|
|
||||||
version = project.version as String
|
|
||||||
from(components["java"])
|
|
||||||
|
|
||||||
pom {
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id.set("4drian3d")
|
|
||||||
name.set("Adrian")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
17
build-logic/build.gradle.kts
Normal file
17
build-logic/build.gradle.kts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.plugin.shadow)
|
||||||
|
implementation(libs.build.indra)
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
14
build-logic/settings.gradle.kts
Normal file
14
build-logic/settings.gradle.kts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
rootProject.name = "build-logic"
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
versionCatalogs {
|
||||||
|
register("libs") {
|
||||||
|
from(files("../gradle/libs.versions.toml"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
plugins {
|
||||||
|
id("net.kyori.indra.publishing")
|
||||||
|
}
|
||||||
|
|
||||||
|
indra {
|
||||||
|
javaVersions {
|
||||||
|
testWith().add(17)
|
||||||
|
}
|
||||||
|
|
||||||
|
github("4drian3d", "AuthMeVelocity") {
|
||||||
|
ci(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
gpl3OrLaterLicense()
|
||||||
|
|
||||||
|
configurePublications {
|
||||||
|
groupId = project.group as String
|
||||||
|
artifactId = project.name.replaceFirst("authmevelocity-", "")
|
||||||
|
version = project.version as String
|
||||||
|
from(components["java"])
|
||||||
|
|
||||||
|
pom {
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id.set("4drian3d")
|
||||||
|
name.set("Adrian")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -36,6 +36,9 @@ bstats-velocity = { group = "org.bstats", name = "bstats-velocity", version.ref
|
|||||||
|
|
||||||
configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" }
|
configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" }
|
||||||
|
|
||||||
|
build-indra = { module = "net.kyori:indra-common", version.ref = "indra" }
|
||||||
|
plugin-shadow = { group = "gradle.plugin.com.github.johnrengelman", name = "shadow", version.ref = "shadow" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
|
||||||
pluginyml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" }
|
pluginyml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" }
|
||||||
|
@ -8,4 +8,12 @@ listOf("common", "paper", "velocity").forEach {
|
|||||||
listOf("paper", "velocity").forEach {
|
listOf("paper", "velocity").forEach {
|
||||||
include("authmevelocity-api-$it")
|
include("authmevelocity-api-$it")
|
||||||
project(":authmevelocity-api-$it").projectDir = file("api/$it")
|
project(":authmevelocity-api-$it").projectDir = file("api/$it")
|
||||||
|
}
|
||||||
|
|
||||||
|
pluginManagement {
|
||||||
|
includeBuild("build-logic")
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user