-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
106 lines (87 loc) · 2.57 KB
/
build.gradle
File metadata and controls
106 lines (87 loc) · 2.57 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
plugins {
id "org.sonarqube" version "3.1.1"
id 'java'
id 'groovy'
id 'org.jetbrains.kotlin.jvm'
id 'jacoco'
id 'maven-publish'
id 'signing'
}
group 'io.github.grigory-rylov'
version '1.6.17'
apply plugin: 'kotlin'
ext {
PUBLISH_GROUP_ID = group
PUBLISH_ARTIFACT_ID = 'android-instrumental-test-runner-core'
PUBLISH_VERSION = version
GROUP = group
VERSION_NAME = version
POM_ARTIFACT_ID='android-instrumental-test-runner-core'
}
apply plugin: 'signing'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url 'https://maven.google.com'
}
}
dependencies {
def kotlin_version = '1.2.61'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile 'org.apache.logging.log4j:log4j-api:2.6.1'
compile 'org.apache.logging.log4j:log4j-core:2.6.1'
compile 'com.google.code.gson:gson:2.8.5'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'org.mockito:mockito-core:2.16.0'
testCompile "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0"
compile localGroovy()
// https://mvnrepository.com/artifact/com.android.tools.ddms/ddmlib
compile group: 'com.android.tools.ddms', name: 'ddmlib', version: '26.5.0'
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.6'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
}
compileGroovy {
dependsOn tasks.getByPath('compileKotlin')
classpath += files(compileKotlin.destinationDir)
}
// sources for unit and integration
sourceSets {
test {
java.srcDir 'src/test/unit/java'
}
integration {
java.srcDir 'src/test/integration/java'
resources.srcDir 'src/test/resources'
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integrationCompile.extendsFrom testCompile
integrationRuntime.extendsFrom testRuntime
}
task integration(type: Test, description: 'Runs the integration tests.', group: 'Verification') {
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = false
}
}
tasks.sonarqube.dependsOn jacocoTestReport
test {
jacoco {
includeNoLocationClasses = true
}
}
java {
withJavadocJar()
withSourcesJar()
}
apply from: 'sonar.gradle'
// ./gradlew -Prelease publish
apply from: 'publish.gradle'