Skip to content

Commit

Permalink
cleanup build script, workaround publishing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Apr 10, 2024
1 parent e91295b commit ec98608
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
47 changes: 18 additions & 29 deletions eupidcredential/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import at.asitplus.gradle.*
import at.asitplus.gradle.Logger
import at.asitplus.gradle.serialization
import at.asitplus.gradle.setupDokka

plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("org.jetbrains.dokka")
id("maven-publish")
id("at.asitplus.gradle.conventions")
id("org.jetbrains.dokka")
id("signing")
}

Expand All @@ -15,42 +16,30 @@ group = "at.asitplus.wallet"
version = artifactVersion

kotlin {
jvm {
withJava()
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
jvm()
iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(serialization("json"))
api("at.asitplus.wallet:vclib:3.4.0")
}
}
val commonTest by getting
val jvmMain by getting
val jvmTest by getting
}
iosX64()
iosArm64()
iosSimulatorArm64()
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://s01.oss.sonatype.org/content/repositories/releases/")
}
}

val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask::class)
val javadocJar = setupDokka(baseUrl = "https://github.com/a-sit-plus/eu-pid-credential/tree/main/")

val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaHtml.outputDirectory)
//catch the missing `signMavenPublication` Task, which slips through for reasons unknown
afterEvaluate {
val signTasks = tasks.filter { it.name.startsWith("sign") }
tasks.filter { it.name.startsWith("publish") }.forEach {
Logger.lifecycle(" * ${it.name} now depends on ${signTasks.joinToString { it.name }}")
it.dependsOn(*signTasks.toTypedArray())
}
}

publishing {
Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ kotlin.native.ignoreDisabledTargets=true

artifactVersion = 2.0.0
jdk.version=17

#this project does not use resources so we can disable the workaround to get rid of the warning
kt65315.workaround=false

0 comments on commit ec98608

Please sign in to comment.