mirror of
https://github.com/AXOLOTsh/LocalizationLib.git
synced 2026-09-21 19:46:20 +03:00
73 lines
1.8 KiB
Kotlin
73 lines
1.8 KiB
Kotlin
plugins {
|
|
id("java-library")
|
|
id("maven-publish")
|
|
id("com.gradleup.shadow") version "9.4.1"
|
|
}
|
|
|
|
group = providers.gradleProperty("group").get()
|
|
version = providers.gradleProperty("version").get()
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly("org.projectlombok:lombok:1.18.46")
|
|
annotationProcessor("org.projectlombok:lombok:1.18.46")
|
|
|
|
implementation("org.jetbrains:annotations:26.1.0")
|
|
implementation("com.google.code.gson:gson:2.14.0")
|
|
|
|
implementation(project(":localizationlib-abstraction"))
|
|
shadow(project(":localizationlib-abstraction"))
|
|
|
|
testImplementation(libs.junit.jupiter)
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
java {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
|
|
tasks {
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier.set("")
|
|
configurations = listOf(project.configurations.shadow.get())
|
|
}
|
|
|
|
named<Test>("test") {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("mavenJava") {
|
|
from(components["shadow"])
|
|
|
|
groupId = project.group.toString()
|
|
artifactId = project.name
|
|
version = project.version.toString()
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "Reposilite"
|
|
|
|
val releasesUrl = "https://maven.axolotsh.org/releases"
|
|
val snapshotsUrl = "https://maven.axolotsh.org/snapshots"
|
|
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsUrl else releasesUrl)
|
|
|
|
credentials {
|
|
username = providers.gradleProperty("reposiliteUser").orNull ?: "admin"
|
|
password = providers.gradleProperty("reposilitePassword").orNull ?: "password"
|
|
}
|
|
}
|
|
}
|
|
}
|