50 lines
1009 B
Plaintext
50 lines
1009 B
Plaintext
plugins {
|
|
kotlin("multiplatform") version "2.0.20"
|
|
`maven-publish`
|
|
}
|
|
|
|
fun readTextFile(relPath:String) = rootDir.resolve(relPath).readText().trim()
|
|
|
|
val targetKotlinVersion = readTextFile("../kotlin-version.txt")
|
|
|
|
group = "ru.landgrafhomyak.kotlin"
|
|
version = "v${readTextFile("../library-version.txt")}k${targetKotlinVersion}"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
|
|
kotlin {
|
|
explicitApi()
|
|
jvmToolchain(8)
|
|
jvm()
|
|
|
|
sourceSets {
|
|
jvmMain {
|
|
dependencies {
|
|
compileOnly("dev.gradleplugins:gradle-api:7.5.1")
|
|
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:${targetKotlinVersion}")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
// other settings of publication
|
|
repositories {
|
|
maven {
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
} |