From 4643f025b2728a597e08b4adac713aa704c709ba Mon Sep 17 00:00:00 2001 From: Distractic Date: Thu, 31 Aug 2023 21:04:56 +0200 Subject: [PATCH 1/3] fix(gradle): New configuration for jitpack --- build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 0a4ec9ec..c0548684 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -144,6 +144,8 @@ tasks { } dokkaHtml.configure { + // CompileJava should be executed to build library in Jitpack + dependsOn(deleteDokkaOutputDir, compileJava.get()) outputDirectory.set(file(dokkaOutputDir)) } @@ -161,6 +163,7 @@ tasks { } val deleteDokkaOutputDir by tasks.register("deleteDokkaOutputDirectory") { + group = "documentation" delete(dokkaOutputDir) } From cfa265a4fbabfd9d1db89317ab29671ca431d538 Mon Sep 17 00:00:00 2001 From: Distractic Date: Thu, 31 Aug 2023 21:33:12 +0200 Subject: [PATCH 2/3] fix(gradle): Try to simplify jar published --- build.gradle.kts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c0548684..ef54f8ad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -135,10 +135,6 @@ tasks { useJUnitPlatform() } - build { - dependsOn(shadowJar) - } - clean { delete(dokkaOutputDir) } @@ -149,10 +145,6 @@ tasks { outputDirectory.set(file(dokkaOutputDir)) } - shadowJar { - archiveClassifier.set("") - } - jacocoTestReport { reports { xml.required.set(true) @@ -168,28 +160,33 @@ val deleteDokkaOutputDir by tasks.register("deleteDokkaOutputDirectory") } val sourcesJar by tasks.registering(Jar::class) { + group = "build" archiveClassifier.set("sources") from(sourceSets.main.get().allSource) } val javadocJar = tasks.register("javadocJar") { + group = "documentation" + dependsOn(tasks.dokkaHtml) dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) archiveClassifier.set("javadoc") from(dokkaOutputDir) } publishing { + val projectName = project.name + publications { - val projectOrganizationPath = "Rushyverse/${project.name}" + val projectOrganizationPath = "Rushyverse/$projectName" val projectGitUrl = "https://github.com/$projectOrganizationPath" - create(project.name) { - shadow.component(this) + create(projectName) { + from(components["kotlin"]) artifact(sourcesJar.get()) artifact(javadocJar.get()) pom { - name.set(project.name) + name.set(projectName) description.set(project.description) url.set(projectGitUrl) From 7e76dc1424e3fc4dd1fd874d656f89d3ae66be2d Mon Sep 17 00:00:00 2001 From: Distractic Date: Fri, 1 Sep 2023 06:27:24 +0200 Subject: [PATCH 3/3] chore: Set as API dependencies --- build.gradle.kts | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ef54f8ad..e4df2c80 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -43,30 +43,29 @@ dependencies { val mockBukkitVersion = "3.18.0" val junitVersion = "5.9.0" val mockkVersion = "1.12.5" - val slf4jVersion = "2.0.0-alpha6" val fastboardVersion = "2.0.0" val kotestVersion = "5.6.2" val icu4jVersion = "73.2" - implementation(kotlin("stdlib")) - implementation(kotlin("stdlib-jdk8")) - implementation(kotlin("reflect")) - implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinSerializableVersion") - implementation("com.charleskorn.kaml:kaml:$kamlVersion") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutineVersion") - implementation("io.github.microutils:kotlin-logging:$loggingVersion") + api(kotlin("stdlib")) + api(kotlin("stdlib-jdk8")) + api(kotlin("reflect")) + api("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinSerializableVersion") + api("com.charleskorn.kaml:kaml:$kamlVersion") + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion") + api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutineVersion") + api("io.github.microutils:kotlin-logging:$loggingVersion") // Plural translation - implementation("com.ibm.icu:icu4j:$icu4jVersion") + api("com.ibm.icu:icu4j:$icu4jVersion") // Injection framework - implementation("io.insert-koin:koin-core:$koinVersion") - implementation("io.insert-koin:koin-logger-slf4j:$koinVersion") + api("io.insert-koin:koin-core:$koinVersion") + api("io.insert-koin:koin-logger-slf4j:$koinVersion") // MC coroutine framework - implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-api:$mccoroutineVersion") - implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-core:$mccoroutineVersion") + api("com.github.shynixn.mccoroutine:mccoroutine-bukkit-api:$mccoroutineVersion") + api("com.github.shynixn.mccoroutine:mccoroutine-bukkit-core:$mccoroutineVersion") // Minecraft server framework "io.papermc.paper:paper-api:$paperVersion".let { @@ -75,7 +74,7 @@ dependencies { } // Scoreboard framework - implementation("fr.mrmicky:fastboard:$fastboardVersion") + api("fr.mrmicky:fastboard:$fastboardVersion") api("com.github.Rushyverse:core:6ae31a9250")