-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
163 changed files
with
473 additions
and
4,343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,147 +1,24 @@ | ||
plugins { | ||
alias(libs.plugins.kotlin.jvm) apply false | ||
alias(libs.plugins.kotlin.plugin.spring) apply false | ||
alias(libs.plugins.spring.boot) apply false | ||
alias(libs.plugins.graph.generator) | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
val subProjectPlugins = listOf( | ||
libs.plugins.kotlin.jvm, | ||
libs.plugins.kotlin.plugin.spring, | ||
libs.plugins.spring.boot, | ||
) | ||
|
||
subprojects { | ||
group = extra["project.group"].toString() | ||
version = extra["project.version"].toString() | ||
|
||
subProjectPlugins.forEach { | ||
pluginManager.apply(it.get().pluginId) | ||
} | ||
|
||
afterEvaluate { | ||
tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar>().configureEach { | ||
this.enabled = false | ||
} | ||
tasks.withType<Jar>().configureEach { | ||
destinationDirectory.get().asFile.listFiles()?.forEach { | ||
it.delete() | ||
} | ||
archiveBaseName.set("${rootProject.name}-${project.name}") | ||
} | ||
tasks.withType<Test>().configureEach { | ||
useJUnitPlatform() | ||
} | ||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
freeCompilerArgs += "-Xjsr305=strict" | ||
jvmTarget = "17" | ||
} | ||
} | ||
extensions.getByType<JavaPluginExtension>().sourceCompatibility = JavaVersion.VERSION_17 | ||
} | ||
} | ||
|
||
dependencyGraphGenerator { | ||
projectGenerators.configureEach { | ||
projectNode = { node, _ -> | ||
node.add(guru.nidi.graphviz.attribute.Style.SOLID, guru.nidi.graphviz.attribute.Color.rgb("#000000")) | ||
} | ||
with(pluginManager) { | ||
apply(JavaLibraryPlugin::class) | ||
apply(MavenPublishPlugin::class) | ||
} | ||
} | ||
|
||
group = extra["project.group"].toString() | ||
version = extra["project.version"].toString() | ||
|
||
if (extra.properties.keys.any { it.startsWith("signing.") } || System.getenv().keys.any { it.startsWith("SIGNING_") }) { | ||
subprojects { | ||
setupPublication(this) | ||
} | ||
} | ||
|
||
fun Project.setupPublication(project: Project) { | ||
apply(plugin = "org.gradle.maven-publish") | ||
apply(plugin = "org.gradle.signing") | ||
|
||
tasks.withType<Jar> { | ||
archiveClassifier.set("") | ||
} | ||
|
||
extensions.getByType<JavaPluginExtension>().run { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
publishing { | ||
extensions.configure<PublishingExtension> { | ||
publications { | ||
create<MavenPublication>("mavenCentral") { | ||
this.groupId = extra["project.group"]!!.toString() | ||
this.version = extra["project.version"]!!.toString() | ||
this.artifactId = "${project.rootProject.name}-${project.name.lowercase()}" | ||
create<MavenPublication>("maven") { | ||
groupId = project.group.toString() | ||
version = project.version.toString() | ||
artifactId = project.name | ||
from(components["java"]) | ||
|
||
pom { | ||
name.set(project.rootProject.name) | ||
url.set(extra["project.url"]!!.toString()) | ||
description.set(extra["project.description"]!!.toString()) | ||
|
||
licenses { | ||
license { | ||
name.set(extra["project.license"]!!.toString()) | ||
url.set(extra["project.license.url"]!!.toString()) | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set(extra["project.developer.id"]!!.toString()) | ||
name.set(extra["project.developer.name"]!!.toString()) | ||
email.set(extra["project.developer.email"]!!.toString()) | ||
} | ||
scm { | ||
url.set(extra["project.url.scm"]!!.toString()) | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "sonatype" | ||
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = System.getenv("OSSRH_USERNAME") | ||
password = System.getenv("OSSRH_PASSWORD") | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
setRequired { | ||
!project.version.toString() | ||
.contains("-SNAPSHOT") && gradle.taskGraph.allTasks.any { it is PublishToMavenRepository } | ||
} | ||
if (!extra.has("signing.keyId")) { | ||
extra["signing.keyId"] = System.getenv("SIGNING_KEY_ID") | ||
} | ||
if (!extra.has("signing.password")) { | ||
extra["signing.password"] = System.getenv("SIGNING_PASSPHRASE") | ||
} | ||
if (!extra.has("signing.secretKeyRingFile")) { | ||
extra["signing.secretKeyRingFile"] = if (System.getenv("SIGNING_SECRET_KEY_RING_FILE_ABSOLUTE") != null) { | ||
System.getenv("SIGNING_SECRET_KEY_RING_FILE_ABSOLUTE") | ||
} else { | ||
System.getenv("HOME") + "/" + System.getenv("SIGNING_SECRET_KEY_RING_FILE") | ||
} | ||
} | ||
sign(this@publications) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<AbstractPublishToMaven>().configureEach { | ||
val signingTasks = tasks.withType<Sign>() | ||
mustRunAfter(signingTasks) | ||
extensions.configure<JavaPluginExtension> { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,16 @@ | ||
kotlin.code.style=official | ||
|
||
project.group=kr.summitsystems | ||
project.version=0.0.9-beta2 | ||
project.group=kr.junhyung | ||
project.version=0.0.1-SNAPSHOT | ||
project.name=spring-bukkit | ||
project.url=https://github.com/summit-systems/spring-bukkit | ||
project.url.scm=https://github.com/summit-systems/spring-bukkit.git | ||
project.url=https://github.com/vjh0107/spring-bukkit | ||
project.url.scm=https://github.com/vjh0107/spring-bukkit.git | ||
|
||
project.description=Springframework based Bukkit plugin development kit. | ||
|
||
project.license=Apache License v2.0 | ||
project.license.url=https://github.com/summit-systems/spring-bukkit/LICENSE.txt | ||
project.license.url=https://github.com/vjh0107/spring-bukkit/LICENSE.txt | ||
|
||
project.developer.id=vjh0107 | ||
project.developer.name=Junhyung Park | ||
project.developer.email=park@junhyung.kr | ||
|
||
# Spigot | ||
spigot.version=1.20.2-R0.1-SNAPSHOT | ||
mock.bukkit.version=3.58.0 | ||
|
||
# Jakarta EE | ||
jakarta.annotation.version=2.1.1 | ||
|
||
# Spring | ||
spring.version=6.1.3 | ||
spring.boot.version=3.2.2 | ||
|
||
# Spring Data JPA | ||
spring.data.jpa.version=3.2.2 | ||
hibernate.version=6.4.3.Final | ||
hikaricp.version=5.0.1 | ||
|
||
# Kotlin | ||
kotlin.version=1.8.22 | ||
kotlinx.coroutines.version=1.7.3 | ||
kotlinx.serialization.version=1.5.1 | ||
|
||
# Jackson | ||
jackson.version=2.15.3 | ||
|
||
# Reactor | ||
reactor.version=3.5.11 | ||
|
||
# Graph generator | ||
graph.generator.version=0.7.0 | ||
project.developer.email=park@junhyung.kr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[versions] | ||
spring-boot = "3.2.4" | ||
bukkit = "1.20.4-R0.1-SNAPSHOT" | ||
|
||
[libraries] | ||
spring-boot-starter = { group = "org.springframework.boot", name = "spring-boot-starter", version.ref = "spring-boot" } | ||
spring-boot-starter-test = { group = "org.springframework.boot", name = "spring-boot-starter-test", version.ref = "spring-boot" } | ||
spigot = { group = "org.spigotmc", name = "spigot-api", version.ref = "bukkit" } | ||
folia = { group = "dev.folia", name = "folia-api", version.ref = "bukkit" } | ||
|
||
[plugins] | ||
#spring-boot = { id = org.springframework.boot", version.ref = "spring-boot" } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...g-bukkit-command/src/main/kotlin/kr/summitsystems/springbukkit/command/CommandAopUtils.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.