forked from google/android-fhir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
45 lines (42 loc) · 1.13 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath(Plugins.androidGradlePlugin)
classpath(Plugins.kotlinGradlePlugin)
classpath(Plugins.navSafeArgsGradlePlugin)
}
}
allprojects {
repositories {
google()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
gradlePluginPortal()
}
configureSpotless()
}
subprojects { configureLicensee() }
// Create a CI repository and also change versions to include the build number
afterEvaluate {
val buildNumber = System.getenv("GITHUB_RUN_ID")
if (buildNumber != null) {
subprojects {
apply(plugin = Plugins.BuildPlugins.mavenPublish)
configure<PublishingExtension> {
repositories {
maven {
name = "CI"
url = uri("file://${rootProject.buildDir}/ci-repo")
}
}
// update version to have suffix of build id
project.version = "${project.version}-build_$buildNumber"
}
}
}
}