forked from jpos/jpos-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (62 loc) · 1.62 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
plugins {
id 'java-gradle-plugin'
id 'maven-publish'
id 'idea'
id "com.gradle.plugin-publish" version "1.2.0"
}
group 'org.jpos'
version '0.0.11-SNAPSHOT'
def isSnapshot = version.contains("SNAPSHOT")
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r'
}
gradlePlugin {
website = 'http://jpos.org'
vcsUrl = 'https://github.com/jpos/jpos-gradle-plugin'
plugins {
jposapp {
id = 'org.jpos.jposapp'
displayName = 'jPOS App Gradle Plugin'
description = 'Implements jPOS app conventions'
implementationClass = 'org.jpos.gradle.JPOSPlugin'
tags.set(['jpos', 'iso8583'])
}
}
}
sourceSets {
functionalTest {
}
}
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
if (project.hasProperty("lint")) {
// gradle -Plint ...
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:preview" << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
tasks.register('functionalTest', Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
useJUnitPlatform()
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
tasks.named('check') {
dependsOn(tasks.functionalTest)
}
tasks.named('test') {
useJUnitPlatform()
}
publishing {
repositories {
if (isSnapshot) {
maven {
mavenLocal();
url = 'file:///opt/local/maven'
}
}
}
}