-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (61 loc) · 1.96 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@file:Suppress("UnstableApiUsage")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
`java-library`
`maven-publish`
kotlin("jvm") apply false
}
allprojects {
group = "me.func"
version = "1.0.15"
}
subprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
withSourcesJar()
}
tasks {
withType<JavaCompile>().configureEach { options.encoding = "UTF-8" }
withType<Jar>().configureEach { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf(
"-Xlambdas=indy",
"-Xno-param-assertions",
"-Xno-receiver-assertions",
"-Xno-call-assertions",
"-Xbackend-threads=0",
"-Xassertions=always-disable",
"-Xuse-fast-jar-file-system",
"-Xsam-conversions=indy"
)
}
}
}
publishing {
repositories {
mavenLocal()
maven {
name = "func"
url = uri(
"https://repo.c7x.dev/repository/maven-${
if (project.version.toString().contains("SNAPSHOT")) "snapshots" else "releases"
}/"
)
credentials {
username = System.getenv("CRI_REPO_LOGIN") ?: System.getenv("CRISTALIX_REPO_USERNAME")
password = System.getenv("CRI_REPO_PASSWORD") ?: System.getenv("CRISTALIX_REPO_PASSWORD")
}
}
}
}
}