forked from adoble/adr-j
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
71 lines (60 loc) · 2.04 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
plugins {
id 'com.github.johnrengelman.shadow' version '4.0.2'
id "com.palantir.graal" version "0.4.0"
}
apply plugin: 'java'
apply plugin: 'application'
graal {
mainClass 'org.doble.adr.ADR'
graalVersion '19.1.1'
outputName 'adr'
}
group = 'org.doble'
version = '0.0.1-SNAPSHOT'
description = "adr-j"
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = "org.doble.adr.ADR"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
jcenter()
maven {
url 'https://oss.sonatype.org/content/groups/public'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
compile group: 'org.reflections', name: 'reflections', version:'0.9.11'
compile 'info.picocli:picocli:4.0.2'
annotationProcessor 'info.picocli:picocli-codegen:4.0.2'
// need 5.4 for @TestMethodOrder - see https://junit.org/junit5/docs/snapshot/api/org/junit/jupiter/api/TestMethodOrder.html
testCompile 'org.junit.jupiter:junit-jupiter-params:5.4.0-M1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.0-M1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.0-M1'
testCompile group: 'com.google.jimfs', name: 'jimfs', version:'1.1'
}
compileJava {
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
shadowJar {
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer)
classifier 'fat'
}
task releaseJar(dependsOn: "shadowJar", type: Copy) {
group = 'ADR-J - Release'
description "Creates a JAR release."
from("$buildDir/libs/adr-j-${project.version}-fat.jar")
rename { String fileName ->
//fileName.replace('-fat', '')
fileName.replace("-${project.version}-fat", "")
}
into("$buildDir/releases")
// set executable with read permissions (first true) and for all (false)
//file("$buildDir/releases/adr-j-${project.version}.jar").setExecutable(true, false)
file("$buildDir/releases/adr-j.jar").setExecutable(true, false)
}