From 1cedfbf57ab4d28e89956da5979c08f932425fee Mon Sep 17 00:00:00 2001 From: lokka30 Date: Sat, 25 Jan 2025 13:05:31 +0800 Subject: [PATCH] build: ver 0.1.8; attempt resolve publishing issue --- build.gradle.kts | 42 +++++++++++++++++++ gradle.properties | 2 +- playtimestats-plugin-bukkit/build.gradle.kts | 1 - playtimestats-plugin-core/build.gradle.kts | 43 +------------------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5d3290f..f2efa2d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,7 @@ + +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion + /* * Copyright (c) 2025 lokka30 and contributors. * @@ -39,6 +43,44 @@ subprojects { plugin("com.gradleup.shadow") } + tasks { + jar { + enabled = false + } + + shadowJar { + archiveClassifier = "" + } + + compileKotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_21 + apiVersion = KotlinVersion.KOTLIN_2_1 + } + } + + compileTestKotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_21 + apiVersion = KotlinVersion.KOTLIN_2_1 + } + } + + compileTestJava { + sourceCompatibility = "21" + targetCompatibility = "21" + } + + compileJava { + options.isDeprecation = true + options.encoding = "UTF-8" + } + + test { + useJUnitPlatform() + } + } + configure { repositories { maven { diff --git a/gradle.properties b/gradle.properties index 22b1b68..7284f4b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ # # Main -version=0.1.7 +version=0.1.8 description=User playtime monitoring for MC # Misc diff --git a/playtimestats-plugin-bukkit/build.gradle.kts b/playtimestats-plugin-bukkit/build.gradle.kts index 08cc74d..d081d33 100644 --- a/playtimestats-plugin-bukkit/build.gradle.kts +++ b/playtimestats-plugin-bukkit/build.gradle.kts @@ -61,7 +61,6 @@ tasks { } shadowJar { - archiveClassifier = "" dependencies { relocate("dev.jorel.commandapi", "${project.group}.plugin.bukkit.lib.commandapi") relocate("org.bstats", "${project.group}.plugin.bukkit.lib.bstats") diff --git a/playtimestats-plugin-core/build.gradle.kts b/playtimestats-plugin-core/build.gradle.kts index 8be1025..6807a30 100644 --- a/playtimestats-plugin-core/build.gradle.kts +++ b/playtimestats-plugin-core/build.gradle.kts @@ -1,6 +1,3 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.jetbrains.kotlin.gradle.dsl.KotlinVersion - /* * Copyright (c) 2025 lokka30 and contributors. * @@ -27,10 +24,6 @@ plugins { apply(plugin = "java") apply(plugin = "kotlin") -repositories { - mavenCentral() -} - dependencies { api(libs.h2) testImplementation(kotlin("test")) @@ -42,43 +35,9 @@ publishing { if (name == "gpr") { artifacts.clear() artifact(tasks.named("shadowJar").get()) { - classifier = "all" + classifier = "" } } } } } - -tasks { - jar { - enabled = true - } - - compileKotlin { - compilerOptions { - jvmTarget = JvmTarget.JVM_21 - apiVersion = KotlinVersion.KOTLIN_2_1 - } - } - - compileTestKotlin { - compilerOptions { - jvmTarget = JvmTarget.JVM_21 - apiVersion = KotlinVersion.KOTLIN_2_1 - } - } - - compileJava { - options.isDeprecation = true - options.encoding = "UTF-8" - } - - test { - useJUnitPlatform() - } -} - -java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 -}