generated from segment-integrations/analytics-kotlin-destination-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
52 lines (45 loc) · 1.26 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
val GROUP: String by project
val VERSION_NAME: String by project
group = GROUP
version = getVersionName()
plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id("org.jetbrains.kotlin.jvm")
// Apply the java-library plugin for API and implementation separation.
`java-library`
id("io.github.gradle-nexus.publish-plugin")
id("io.gitlab.arturbosch.detekt")
}
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
val KOTLIN_VERSION: String by project
val GRADLE_VERSION: String by project
val DETEKT_VERSION: String by project
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION")
classpath("org.jetbrains.kotlin:kotlin-serialization:$KOTLIN_VERSION")
classpath("com.android.tools.build:gradle:$GRADLE_VERSION")
classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$DETEKT_VERSION")
}
}
allprojects {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
nexusPublishing {
repositories {
sonatype()
}
}
fun getVersionName() =
if (hasProperty("release"))
VERSION_NAME
else
"$VERSION_NAME-SNAPSHOT"