-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
57 lines (50 loc) · 1.56 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
import com.android.build.gradle.internal.cxx.logging.warnln
buildscript {
repositories {
google()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
}
}
plugins {
id("org.sonarqube") version "4.2.1.3168"
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}
allprojects {
group = "rocks.frieler.android"
version = "0.9.0-SNAPSHOT"
repositories {
google()
mavenCentral()
}
}
tasks {
val clean by registering(Delete::class) {
delete(layout.buildDirectory)
}
}
sonar {
properties {
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.organization", "christopherfrieler")
property("sonar.projectName", "android-beans")
property("sonar.projectKey", "christopherfrieler_android-beans")
when (val analysisType = System.getenv("SONAR_ANALYSIS_TYPE")) {
"branch" -> property("sonar.branch.name", System.getenv("SONAR_BRANCH_NAME"))
"pull_request" -> property("sonar.pullrequest.key", System.getenv("SONAR_PULLREQUEST_KEY"))
else -> warnln("unknown SONAR_ANALYSIS_TYPE: '%s'", analysisType)
}
}
}
nexusPublishing {
packageGroup = project.group as String
this.repositories {
sonatype {
stagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID")
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}