-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
92 lines (76 loc) · 2.96 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
88
89
90
91
92
buildscript {
ext.versions = [kotlin: '1.4.0',
jacoco: '0.8.2',]
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.29.0'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.12.0'
}
}
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'pl.allegro.tech.build.axion-release'
scmVersion {
tag {
prefix = ''
}
hooks {
pre 'fileUpdate', [file : 'README.md',
pattern : { v, p -> /([-\/:])$v([-\/'])/ },
replacement: { v, p -> "\$1$v\$2" }]
pre 'commit', { v, p -> "Release version: $v [ci skip]" }
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
subprojects {
version = scmVersion.version
group = 'com.github.tmurakami'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
dependencyUpdates {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
ext {
deps = [jarjar : 'org.pantsbuild:jarjar:1.7.2',
dexlib2 : 'org.smali:dexlib2:2.4.0',
junit : 'junit:junit:4.13',]
deps.kotlin = [stdlib: "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",]
deps.androidx = [annotation: 'androidx.annotation:annotation:1.1.0',]
def testVersion = '1.3.0'
deps.androidx.test = [core : "androidx.test:core:$testVersion",
core_ktx: "androidx.test:core-ktx:$testVersion",
runner : "androidx.test:runner:$testVersion",]
def extJUnitVersion = '1.1.2'
deps.androidx.test.ext = [junit : "androidx.test.ext:junit:$extJUnitVersion",
junit_ktx: "androidx.test.ext:junit-ktx:$extJUnitVersion",]
deps.android = [support: [annotation: 'com.android.support:support-annotations:28.0.0',
test : [rules: 'com.android.support.test:rules:1.0.2',],],]
def mockitoVersion = '3.5.9'
deps.mockito = [core : "org.mockito:mockito-core:$mockitoVersion",
android: "org.mockito:mockito-android:$mockitoVersion",]
deps.mockito2 = [core: 'org.mockito:mockito-core:2.28.2',]
def dexmakerVersion = '2.28.0'
deps.dexmaker = [mockito : "com.linkedin.dexmaker:dexmaker-mockito:$dexmakerVersion",
mockito_inline_extended: "com.linkedin.dexmaker:dexmaker-mockito-inline-extended:$dexmakerVersion",]
deps.mockk = [android: 'io.mockk:mockk-android:1.10.0',]
}