-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
49 lines (41 loc) · 1.32 KB
/
build.gradle
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
buildscript {
apply from: "$rootDir/gradle/dependencies.gradle"
repositories {
google()
maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }
maven { url "https://plugins.gradle.org/m2/" }
jcenter()
}
dependencies {
classpath deps.plugins.kotlin
classpath deps.plugins.dokka
classpath deps.plugins.node
}
}
apply from: "$rootDir/gradle/dependencies.gradle"
allprojects {
repositories {
google()
jcenter()
}
group = GROUP
version = VERSION_NAME
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def addDependency(Upload task, String groupId, String artifactId, String version, String type) {
task.repositories.withType(org.gradle.api.artifacts.maven.MavenDeployer) { mavenDeployer ->
task.doFirst {
mavenDeployer.pom.whenConfigured {
// For whatever reason we can't 'new' these ourselves. Clone an existing instance instead.
def dependency = it.dependencies.get(0).clone()
dependency.groupId = groupId
dependency.artifactId = artifactId
dependency.version = version
dependency.type = type
it.dependencies.add(dependency)
}
}
}
}