-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
87 lines (76 loc) · 2.63 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@file:Suppress("UnstableApiUsage")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
`java-library`
`maven-publish`
kotlin("jvm") apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator")
}
allprojects {
group = "me.func.visual-driver"
// Версия генерируется автоматически
val release = project.properties["buildVersion"]
if (release != null) {
val build = release.toString().toInt()
project.version = "" + build / 100 + "." + (build / 10) % 10 + "." + build % 10 + ".RELEASE"
} else {
project.version = "3.3.13.TEST"
}
}
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")
?: System.getenv("REPO_C7X_USERNAME")
password =
System.getenv("CRI_REPO_PASSWORD") ?: System.getenv("CRISTALIX_REPO_PASSWORD") ?: System.getenv(
"REPO_C7X_PASSWORD"
)
}
}
}
}
}
apiValidation {
ignoredProjects.addAll(listOf("mod", "graffiti", "graffiti-service"))
}