-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
86 lines (71 loc) · 1.86 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
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.10.0'
id 'com.gradle.build-scan' version '1.15.1'
id 'org.jetbrains.kotlin.jvm' version '1.2.51'
id 'com.diffplug.gradle.spotless' version '3.13.0'
id 'me.tadej.versioning' version '0.1.1'
}
apply plugin: 'jacoco'
group = 'me.tadej'
version = versioning.versionName()
repositories {
jcenter()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0'
implementation 'org.apache.commons:commons-exec:1.3'
testCompile 'junit:junit:4.12'
testCompile 'com.google.truth:truth:0.42'
testCompile 'org.mockito:mockito-core:2.23.0'
testCompile 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC1'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = '1.8'
}
}
spotless {
kotlin {
target '**/*.kt'
ktlint()
licenseHeaderFile project.rootProject.file('misc/header.txt')
}
}
def CI = System.getenv('CI') == 'true'
jacocoTestReport {
reports {
xml.enabled true
html.enabled !CI
}
}
check.dependsOn jacocoTestReport
pluginBundle {
def github = 'https://github.com/tslamic/versioning'
website = github
vcsUrl = "${github}.git"
plugins {
versioningPlugin {
id = 'me.tadej.versioning'
displayName = 'Version tracking for Android'
description = 'Helps with version tracking using Git metadata.'
tags = [
'android', 'versioning', 'version',
'git', 'version', 'versioning',
]
}
}
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
if (CI) {
publishAlways()
tag 'CI'
}
}