Skip to content

Commit 40e2961

Browse files
committed
update build configuration
1 parent ac3ea9c commit 40e2961

6 files changed

Lines changed: 21 additions & 57 deletions

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Build_ConfigAPI.xml

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Clean_ConfigAPI.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Publish_ConfigAPI.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 17 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
import java.nio.charset.StandardCharsets
23
import kotlin.io.path.Path
34

45
plugins {
5-
id("java")
6-
id("maven-publish")
7-
id("io.freefair.lombok") version "8.10"
8-
id("com.gradleup.shadow") version "8.3.0"
6+
java
7+
`maven-publish`
8+
id("io.freefair.lombok") version "8.12.1"
9+
id("com.gradleup.shadow") version "9.0.0-beta8"
910
}
1011

1112
object Project {
1213
const val NAME = "ConfigAPI"
1314
const val GROUP = "net.j4c0b3y"
14-
const val AUTHOR = "J4C0B3Y"
1515
const val VERSION = "1.2.2"
1616
}
1717

@@ -24,49 +24,46 @@ allprojects {
2424
subprojects {
2525
apply(plugin = "java")
2626
apply(plugin = "io.freefair.lombok")
27-
apply(plugin = "com.gradleup.shadow")
2827
apply(plugin = "maven-publish")
28+
apply(plugin = "com.gradleup.shadow")
2929

3030
java {
3131
sourceCompatibility = JavaVersion.VERSION_1_8
3232
targetCompatibility = JavaVersion.VERSION_1_8
3333
withSourcesJar()
3434
}
3535

36-
dependencies {
37-
if (name != "core") {
38-
implementation(project(":core"))
36+
tasks {
37+
compileJava {
38+
options.encoding = StandardCharsets.UTF_8.name()
3939
}
40-
}
4140

42-
tasks {
4341
register<Copy>("copy") {
44-
from(named("shadowJar"))
42+
from(shadowJar)
4543
rename("(.*)-all.jar", "${Project.NAME}-${this@subprojects.name}-${Project.VERSION}.jar")
4644
into(Path(rootDir.path, "jars"))
4745
}
4846

49-
named<JavaCompile>("compileJava") {
50-
options.encoding = "UTF-8"
51-
}
47+
build { dependsOn(named("copy")) }
5248
}
5349

5450
publishing {
5551
repositories {
56-
maven {
52+
maven("https://repo.j4c0b3y.net/public/") {
5753
name = "j4c0b3yPublic"
58-
url = uri("https://repo.j4c0b3y.net/public")
54+
5955
credentials(PasswordCredentials::class)
56+
6057
authentication {
6158
create<BasicAuthentication>("basic")
6259
}
6360
}
6461
}
6562

6663
publications {
67-
create<MavenPublication>("release") {
68-
artifactId = this@subprojects.name
69-
groupId = "${Project.GROUP}.${Project.NAME}"
64+
create<MavenPublication>(name) {
65+
artifactId = Project.NAME + "-" + name
66+
groupId = Project.GROUP
7067
version = Project.VERSION
7168

7269
artifact(tasks.named<ShadowJar>("shadowJar").get().archiveFile)
@@ -79,32 +76,4 @@ subprojects {
7976
}
8077
}
8178

82-
tasks {
83-
named("classes") {
84-
depend(this)
85-
}
86-
87-
register("shadow") {
88-
depend(this, "shadowJar")
89-
}
9079

91-
register("delete") {
92-
file("jars").deleteRecursively()
93-
}
94-
95-
register("copy") {
96-
depend(this)
97-
}
98-
99-
named("clean") {
100-
depend(this)
101-
}
102-
103-
register("install") {
104-
depend(this, "publishReleasePublicationToMavenLocal")
105-
}
106-
}
107-
108-
fun depend(task: Task, name: String = task.name) {
109-
task.dependsOn(subprojects.map { it.tasks.named(name) })
110-
}

bukkit/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ repositories {
55
}
66

77
dependencies {
8+
implementation(project(":core"))
89
compileOnly("org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT")
910
}

0 commit comments

Comments
 (0)