-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (96 loc) · 2.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
plugins {
id 'java-gradle-plugin'
id 'org.ysb33r.gradletest' version '3.0.0-alpha.2'
id 'com.gradle.plugin-publish' version '0.15.0'
id 'maven-publish'
id 'signing'
}
group = 'io.jumpco.open'
if (project.findProperty('buildVersion') == 'LOCAL_SNAPSHOT') {
version = 'LOCAL_SNAPSHOT'
} else {
version = '1.0.1'
}
repositories {
mavenLocal()
mavenCentral()
}
jar {
manifest {
attributes([
'Manifest-Version' : '1.0',
'Implementation-Version': project.version,
'Build-Tag' : project.version
])
}
}
dependencies {
testCompileOnly gradleTestKit()
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.assertj:assertj-core:3.21.0'
gradleTest 'org.junit.jupiter:junit-jupiter:5.7.2'
gradleTest 'org.assertj:assertj-core:3.21.0'
}
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
gradlePlugin {
// Define the plugin
plugins {
localPropertiesPlugin {
id = 'io.jumpco.open.gradle.local-properties'
displayName = 'Local Properties Plugin'
description = 'Override properties with gradle.local.properties'
implementationClass = 'io.jumpco.open.gradle.LocalPropertiesPlugin'
}
}
}
// Add a source set for the functional test suite
sourceSets {
functionalTest {
}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
// Add a task to run the functional tests
tasks.register('functionalTest', Test) {
group 'verification'
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
useJUnitPlatform()
}
tasks.named('check') {
// Run the functional tests as part of `check`
dependsOn(tasks.functionalTest)
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
pluginBundle {
website = 'https://open.jumpco.io/projects/local-properties-plugin.html'
vcsUrl = 'https://github.com/open-jumpco/local-properties-plugin'
plugins {
localPropertiesPlugin {
displayName = 'Local Properties Plugin'
description = 'Local Properties Plugin. Override properties with gradle.local.properties'
tags = ['override', 'properties']
version = project.version
}
}
}
task sourcesJar(type: Jar) {
from fileTree(dir: 'src/main/java')
archiveClassifier = 'sources'
}
artifacts {
archives jar
archives sourcesJar
}
gradleTest {
versions '7.2', '7.1.1', '7.0.2'
versions '6.8.3', '6.6.1', '6.5.1', '6.4.1', '6.3', '6.2.1', '6.1.1', '6.0.1'
versions '5.4.1', '5.5.1', '5.6.4'
beforeTest {
println " ${it.name}"
}
}