Using the helper library in buildscript and fixing package

This commit is contained in:
Andrew Golovashevich 2024-11-05 15:25:39 +03:00
parent f55bea6bcc
commit 77f99c6e59

View File

@ -1,82 +1,40 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import ru.landgrafhomyak.kotlin.kmp_gradle_build_helper.defineAllMultiplatformTargets
import ru.landgrafhomyak.kotlin.kmp_gradle_build_helper.optInContracts
import ru.landgrafhomyak.kotlin.kmp_gradle_build_helper.defineXomrkGiteaMavenRepo
buildscript {
repositories {
maven("https://maven.landgrafhomyak.ru/")
}
dependencies {
classpath("ru.landgrafhomyak.kotlin:kotlin-mpp-gradle-build-helper:v0.1k2.0.20")
}
}
plugins { plugins {
kotlin("multiplatform") version "2.0.20" kotlin("multiplatform") version "2.0.20"
`maven-publish` `maven-publish`
} }
group = "ru.landgrafhomyak.kotlin.utilities" group = "ru.landgrafhomyak.kotlin"
version = "v1.0k2.0.20" version = "v1.0k2.0.20"
repositories { repositories {
mavenCentral() mavenCentral()
maven("https://maven.landgrafhomyak.ru/")
} }
@OptIn(ExperimentalWasmDsl::class)
kotlin { kotlin {
explicitApi() explicitApi()
jvmToolchain(8) jvmToolchain(8)
jvm { optInContracts()
} defineAllMultiplatformTargets()
js(IR) {
browser()
nodejs()
}
wasmWasi {
nodejs()
}
wasmJs {
nodejs()
browser()
d8()
}
macosArm64()
macosX64()
linuxArm64()
linuxX64()
mingwX64()
androidNativeArm32()
androidNativeArm64()
androidNativeX64()
androidNativeX86()
iosArm64()
iosSimulatorArm64()
iosX64()
tvosX64()
tvosArm64()
tvosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
watchosDeviceArm64()
watchosSimulatorArm64()
sourceSets {
commonMain {
dependencies {
}
}
}
} }
publishing { publishing {
// other settings of publication // other settings of publication
repositories { repositories {
maven { defineXomrkGiteaMavenRepo()
name = "XomrkMaven"
url = uri("https://git.landgrafhomyak.ru/api/packages/xomrk/maven/")
credentials(HttpHeaderCredentials::class) {
name = "Authorization"
value = "token ${System.getenv("XOMRK_MAVEN_REPO_DEPLOY_TOKEN")}"
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
} }
} }