-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
87 lines (75 loc) · 2.89 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
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
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }
}
dependencies {
classpath KotlinLibraries.gradlePlugin
classpath KotlinLibraries.nativePlguin
}
}
plugins {
id("com.jfrog.bintray") version("1.8.4") apply(false)
id("org.jetbrains.dokka") version("0.9.17") apply(false)
}
group Configurations.groupId
version Configurations.cleanArchCoreVersion
allprojects { project ->
apply plugin: "com.jfrog.bintray"
apply plugin: "org.jetbrains.dokka"
final localProperties = BuildUtils.getLocalProperties(project)
project.group = Configurations.groupId
bintray {
user = localProperties.getProperty("BINTRAY_USER")
key = localProperties.getProperty("BINTRAY_API_KEY")
apiUrl = "https://api.bintray.com"
override = true // for multi-platform Kotlin/Native publishing
dryRun = System.getProperty("BINTRAY_DRY_RUN") ?: false
publish = true
pkg {
repo = "maven"
name = "clean-arch"
userOrg = localProperties.getProperty("BINTRAY_USER")
licenses = ['Apache-2.0']
vcsUrl = Configurations.cleanArchProjectScmUrl
issueTrackerUrl = Configurations.cleanArchProjectUrl + "/issues"
githubRepo = 'bitsydarel/clean-arch'
setLabels("kotlin")
afterEvaluate {
version {
name = project.name.contains("core") ? Configurations.cleanArchCoreVersion : Configurations.cleanArchRxJavaVersion
released = new Date()
}
}
}
}
bintrayUpload.doFirst {
publications = project.publishing.publications
.findAll { !it.name.contains('-test') }
.collect {
println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'")
it.name // WORKAROUND for https://github.com/bintray/gradle-bintray-plugin/issues/256
}
}
// TODO work around for https://youtrack.jetbrains.com/issue/KT-27170
configurations {
compileClasspath
}
repositories {
mavenCentral()
jcenter()
gradlePluginPortal()
maven { url Configurations.remoteMavenRepo }
maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }
}
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign }) {
allprojects {
ext."signing.keyId" = localProperties.getProperty("signing.keyId")
ext."signing.secretKeyRingFile" = localProperties.getProperty("signing.secretKeyRingFile")
ext."signing.password" = localProperties.getProperty("signing.password")
}
}
}
}