Skip to content

Commit 30a01d4

Browse files
committed
attempt to fix gradle build by making thigns closer to ktmidi.
1 parent dd40718 commit 30a01d4

File tree

1 file changed

+12
-38
lines changed

1 file changed

+12
-38
lines changed

mugene/build.gradle.kts

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ version = libs.versions.mugene.get()
2828
kotlin {
2929
jvmToolchain(17)
3030

31-
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3231
compilerOptions {
3332
optIn.add("kotlin.ExperimentalStdlibApi")
3433
}
@@ -45,7 +44,7 @@ kotlin {
4544
useJUnit()
4645
}
4746
}
48-
@OptIn(ExperimentalWasmDsl::class)
47+
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
4948
wasmJs {
5049
binaries.library()
5150
browser()
@@ -68,7 +67,7 @@ kotlin {
6867
macosArm64()
6968
macosX64()
7069

71-
val iosTargets = listOf(
70+
listOf(
7271
iosArm64(),
7372
iosX64(),
7473
iosSimulatorArm64()
@@ -204,35 +203,14 @@ android {
204203
minSdk = libs.versions.android.minSdk.get().toInt()
205204
}
206205
buildTypes {
207-
val debug by getting {
208-
//minifyEnabled(false)
209-
}
210-
val release by getting {
211-
//minifyEnabled(false)
212-
}
213-
}
214-
compileOptions {
215-
sourceCompatibility = JavaVersion.VERSION_17
216-
targetCompatibility = JavaVersion.VERSION_17
206+
val debug by getting
207+
val release by getting
217208
}
218209
}
219210

220211
afterEvaluate {
221212
publishing {
222-
223-
repositories {
224-
maven {
225-
name = "OSSRH"
226-
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
227-
credentials {
228-
username = System.getenv("OSSRH_USERNAME")
229-
password = System.getenv("OSSRH_PASSWORD")
230-
}
231-
}
232-
}
233-
234213
publications.withType<MavenPublication> {
235-
236214
// https://github.com/gradle/gradle/issues/26091#issuecomment-1681343496
237215
val dokkaJar = project.tasks.register("${name}DokkaJar", Jar::class) {
238216
group = JavaBasePlugin.DOCUMENTATION_GROUP
@@ -248,7 +226,7 @@ afterEvaluate {
248226
artifact(dokkaJar)
249227

250228
pom {
251-
name.set("mugene-ng")
229+
name.set("$name")
252230
description.set("mugene-ng MML (Music Macro Language) compiler for MIDI 1.0 and MIDI 2.0")
253231
url.set("https://github.com/atsushieno/mugene-ng")
254232
scm {
@@ -270,18 +248,14 @@ afterEvaluate {
270248
}
271249
}
272250

273-
val ver = version.toString()
274-
for (p in publications) {
275-
(p as MavenPublication).apply {
276-
groupId = group.toString()
277-
if (name.contains("kotlinMultiplatform")) {
278-
artifactId = "mugene"
279-
} else if (name.contains("android")) {
280-
artifactId = "mugene-android"
281-
} else {
282-
artifactId = "mugene-${name}"
251+
repositories {
252+
maven {
253+
name = "OSSRH"
254+
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
255+
credentials {
256+
username = System.getenv("OSSRH_USERNAME")
257+
password = System.getenv("OSSRH_PASSWORD")
283258
}
284-
version = ver
285259
}
286260
}
287261
}

0 commit comments

Comments
 (0)