-
Notifications
You must be signed in to change notification settings - Fork 76
/
build.gradle
84 lines (70 loc) · 2.11 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
import org.gradle.api.internal.classpath.ModuleRegistry
import org.gradle.api.internal.project.ProjectInternal
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath 'com.gradle.publish:plugin-publish-plugin:0.10.1'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.16.0'
}
}
apply plugin: 'groovy'
apply plugin: 'java-library'
apply plugin: 'java-gradle-plugin'
apply plugin: 'com.vanniktech.android.junit.jacoco'
apply plugin: "com.vanniktech.maven.publish"
apply plugin: 'com.gradle.plugin-publish'
gradlePlugin {
plugins {
androidJUnitJacocoPlugin {
id = 'com.vanniktech.android.junit.jacoco'
implementationClass = 'com.vanniktech.android.junit.jacoco.GenerationPlugin'
}
}
}
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
api gradleApi()
api localGroovy()
compileOnly 'com.android.tools.build:gradle:7.1.2'
testImplementation 'com.android.tools.build:gradle:7.1.2'
testImplementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
testImplementation 'junit:junit:4.13'
testImplementation 'org.spockframework:spock-core:2.2-M1-groovy-3.0', { exclude module: "groovy-all" } // Use localGroovy()
// https://github.com/gradle/gradle/issues/16774#issuecomment-893493869
def toolingApiBuildersJar = (project as ProjectInternal).services.get(ModuleRegistry.class)
.getModule("gradle-tooling-api-builders")
.classpath
.asFiles
.first()
testRuntimeOnly(files(toolingApiBuildersJar))
}
sourceCompatibility = JavaVersion.VERSION_1_8
pluginBundle {
website = POM_URL
vcsUrl = POM_SCM_URL
plugins {
androidJUnitJacocoPlugin {
displayName = POM_NAME
tags = ['gradle', 'android', 'jacoco', 'app module', 'library module', 'junit', 'unit', 'testing', 'coverage']
description = POM_DESCRIPTION
}
}
}
tasks.withType(Test).configureEach {
testLogging {
testLogging.exceptionFormat = 'full'
}
}
wrapper {
gradleVersion = '7.4'
distributionType = Wrapper.DistributionType.ALL
}