forked from slimjar/slimjar
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
55 lines (46 loc) · 1.67 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
import java.net.URI
// Workaround for (https://youtrack.jetbrains.com/issue/KTIJ-19369)
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
java
alias(libs.plugins.kotlin.jvm)
id("com.github.hierynomus.license-base") version "0.16.1"
}
allprojects {
apply(plugin = "java")
apply(plugin = "com.github.hierynomus.license-base")
repositories {
mavenCentral()
}
license {
header = rootProject.file("LICENSE")
includes(listOf("**/*.java', '**/*.kt"))
mapping("kt", "DOUBLESLASH_STYLE")
mapping("java", "DOUBLESLASH_STYLE")
}
plugins.withType<KotlinBasePlugin> {
extensions.configure<KotlinProjectExtension> {
jvmToolchain(17)
explicitApi()
}
}
dependencies {
// implementation(kotlin("bom:${rootProject.libs.versions.kotlin.get()}")) // Keep kotlin versions in sync.
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
afterEvaluate {
plugins.withType<MavenPublishPlugin> {
extensions.getByName<PublishingExtension>("publishing").apply {
repositories.maven {
name = "RacciRepo"
url = URI("https://repo.racci.dev/${if (project.version.toString().endsWith("-SNAPSHOT")) "snapshots" else "releases"}")
credentials(PasswordCredentials::class)
}
}
}
}
}