-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
46 lines (40 loc) · 1.2 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
alias libs.plugins.kotlinAndroid apply false
alias libs.plugins.mavenPublish apply false
alias libs.plugins.ubique.alpaka apply false
alias libs.plugins.ubique.preset apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
allprojects {
group = property("GROUP").toString()
version = getProjectVersion()
plugins.withId("com.vanniktech.maven.publish") {
mavenPublishing {
pom {
group = project.group
version = project.version
}
}
}
// https://github.com/Kotlin/dokka/issues/2956
tasks.matching { task ->
task.name.contains("javaDocReleaseGeneration")
}.configureEach {
enabled = false
}
}
private String getProjectVersion() {
def versionFromGradleProperties = property("VERSION").toString()
def versionFromWorkflow = null
try {
versionFromWorkflow = property("githubRefName").toString().replaceFirst("^v", "")
} catch (MissingPropertyException ignored) {
// Ignore exception and continue
}
return versionFromWorkflow ?: versionFromGradleProperties
}