-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
76 lines (66 loc) · 2.39 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version PluginVersions.Kotlin
java
id(PluginIds.Idea)
id(PluginIds.TaskTree) version PluginVersions.TaskTree
id(PluginIds.DependencyAnalysis) version PluginVersions.DependencyAnalysis
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "io.provenance.explorer"
version = project.property("version")?.takeIf { it != "unspecified" } ?: "1.0-SNAPSHOT"
// Publishing
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri(project.property("nexus.url") as String))
snapshotRepositoryUrl.set(uri(project.property("nexus.snapshot.repository.url") as String))
username.set(findProject(project.property("nexus.username") as String)?.toString() ?: System.getenv("OSSRH_USERNAME"))
password.set(findProject(project.property("nexus.password") as String)?.toString() ?: System.getenv("OSSRH_PASSWORD"))
stagingProfileId.set(project.property("nexus.staging.profile.id") as String) // prevents querying for the staging profile id, performance optimization
}
}
}
allprojects {
group = "io.provenance.explorer"
version = artifactVersion(this)
repositories {
mavenCentral()
}
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor(0, "seconds")
cacheChangingModulesFor(0, "seconds")
}
}
subprojects {
apply {
plugin(PluginIds.Kotlin)
plugin(PluginIds.Idea)
}
repositories {
mavenLocal()
mavenCentral()
maven { url = project.uri("https://maven.java.net/content/groups/public") }
maven { url = project.uri("https://oss.sonatype.org/content/repositories/snapshots") }
maven { url = project.uri("https://dl.bintray.com/kotlin/exposed") }
}
tasks.withType<Javadoc> { enabled = false }
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = sourceCompatibility
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf(
"-Xjsr305=strict",
"-Xopt-in=kotlin.RequiresOptIn",
"-Xopt-in=kotlin.contracts.ExperimentalContracts"
)
jvmTarget = "11"
languageVersion = "1.6"
apiVersion = "1.6"
}
}
}