-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
72 lines (62 loc) · 1.84 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
buildscript {
repositories {
mavenLocal()
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-dev") }
jcenter()
google()
gradlePluginPortal()
maven { setUrl("https://jitpack.io") }
}
dependencies {
project.registerDependencies()
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Dependency.kotlinVersion}")
val useMavenLocal = getBooleanProperty("DEVFUN_GRADLE_PLUGIN_USE_MAVEN_LOCAL", false)
if (useMavenLocal) {
val mavenLocalVersion = getStringProperty("DEVFUN_GRADLE_PLUGIN_MAVEN_LOCAL_VERSION", project.versionName)
val localDependency = "com.nextfaze.devfun:devfun-gradle-plugin:$mavenLocalVersion"
println("Using local devfun-gradle-plugin '$localDependency'\n")
classpath(localDependency)
} else {
classpath("gradle.plugin.com.nextfaze.devfun:devfun-gradle-plugin:+")
}
}
}
registerDependencies()
plugins {
`build-scan`
idea
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
setTermsOfServiceAgree("yes")
}
allprojects {
version = versionName
group = groupName
repositories {
mavenLocal()
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-dev") }
jcenter()
google()
maven { setUrl("https://kotlin.bintray.com/kotlinx/") }
maven { setUrl("https://jitpack.io") }
}
println(
"""$name
|>> group: $group
|>> artifact: $name
|>> version: $version
|""".trimMargin()
)
if (project.isSnapshot) {
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
}
}
idea {
module {
excludeDirs = excludeDirs + file("_working")
}
}