-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
55 lines (48 loc) · 1.52 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
//file:noinspection GroovyAssignabilityCheck
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
buildscript {
ext.kotlin_version = '1.8.20'
ext.dokka_version = '1.4.20'
ext.jacoco_version = '0.8.8'
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "1.19.0"
id 'nl.fabianm.kotlin.plugin.generated' version '1.3.2'
id 'org.jetbrains.kotlin.js' version "$kotlin_version"
}
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
def getGitCommitCount() {
try {
def process = "git rev-list HEAD --count".execute()
return process.text.trim()
} catch (Exception e) {
logger.log(LogLevel.ERROR, "Failed to get Git commit count, is Git installed?", e)
return null
}
}
subprojects {
final isCI = !"$System.env.CI".isEmpty()
final isMaster = "$System.env.CIRCLE_BRANCH" == "master"
final buildNumber = getGitCommitCount() ?: "0"
group 'com.ToxicBakery.logging'
version "1.40.$buildNumber" + (isCI && isMaster ? "" : "-SNAPSHOT")
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
}