-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (90 loc) · 2.88 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
buildscript {
ext.isCiBuild = System.getenv("CI") == "true"
ext.kotlinVersion = '1.4.10'
ext.dokkaVersion = '1.4.0'
ext.detektVersion = '1.14.2'
ext.pluginPublishingPluginVersion = '0.12.0'
ext.mavenPublishPluginVersion = '0.13.0'
ext.androidGradlePluginVersion = '4.1.0'
ext.junitVersion = '4.13'
ext.truthVersion = '1.0.1'
}
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version "$pluginPublishingPluginVersion"
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
id 'org.jetbrains.dokka' version "$dokkaVersion"
id 'io.gitlab.arturbosch.detekt' version "$detektVersion"
id 'com.vanniktech.maven.publish' version "$mavenPublishPluginVersion"
}
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
group = GROUP
version = VERSION_NAME
pluginBundle {
website = POM_URL
vcsUrl = POM_SCM_URL
tags = ['gradle', 'android', 'firebase-test-lab', 'testing']
mavenCoordinates {
groupId = GROUP
artifactId = POM_ARTIFACT_ID
}
}
gradlePlugin {
plugins {
firestorm {
id = 'io.github.reactivecircus.firestorm'
displayName = POM_NAME
description = POM_DESCRIPTION
implementationClass = 'reactivecircus.firestorm.FirestormPlugin'
}
}
}
configurations {
fixtureClasspath
}
tasks.getByName('pluginUnderTestMetadata')
.getPluginClasspath()
.from(configurations.fixtureClasspath)
sourceSets {
functionalTest {}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
dependencies {
compileOnly "com.android.tools.build:gradle:$androidGradlePluginVersion"
testImplementation "junit:junit:$junitVersion"
testImplementation "com.google.truth:truth:$truthVersion"
testImplementation "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
testImplementation "com.android.tools.build:gradle:$androidGradlePluginVersion"
fixtureClasspath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
fixtureClasspath "com.android.tools.build:gradle:$androidGradlePluginVersion"
}
task functionalTest(type: Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
}
check {
dependsOn(tasks.functionalTest)
}
tasks.withType(Test).configureEach {
maxParallelForks Runtime.runtime.availableProcessors() * 2
testLogging {
events 'passed', 'skipped', 'failed'
}
}
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion"
}
detekt {
input = files("src/")
failFast = true
config = files("${rootDir}/detekt.yml")
buildUponDefaultConfig = true
reports {
html.destination = file("${project.buildDir}/reports/detekt/${project.name}.html")
}
}