-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
84 lines (71 loc) · 2.31 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
plugins {
id 'java'
id 'application'
id 'com.github.gmazzo.buildconfig' version '3.0.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
testImplementation 'org.testng:testng:7.4.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.api-client:google-api-client:1.31.2'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.31.2'
implementation 'com.google.apis:google-api-services-sheets:v4-rev612-1.25.0'
implementation 'com.fifesoft:rsyntaxtextarea:3.1.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.3'
}
buildConfig {
packageName("de.robojumper.ddsavereader")
buildConfigField('String', 'NAME', "\"${project.name}\"")
buildConfigField('String', 'VERSION', "\"${project.version}\"")
buildConfigField('String', 'DISPLAY_NAME', "\"$displayname\"")
buildConfigField('String', 'GITHUB_URL', "\"$githuburl\"")
buildConfigField('String', 'UPDATE_URL', "\"$releasesurl\"")
buildConfigField('String', 'JAR_NAME', "\"${jarname}.jar\"")
buildConfigField('String', 'DATA_DIR', "\"$datadir\"")
}
test {
useTestNG()
}
jar {
if (!project.hasProperty("includeSecret")) {
exclude 'client_secret.json'
}
archiveBaseName = "$jarname"
}
mainClassName = "de.robojumper.ddsavereader.Main"
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': mainClassName
}
setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
archiveBaseName = "$jarname"
archiveFileName = "${jarname}.jar"
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task dist(type: Zip, dependsOn: fatJar) {
from("${buildDir}/libs") {
include "${jarname}.jar"
}
from("${projectDir}") {
include 'LICENSE'
include 'README.md'
}
from ("${projectDir}/Licenses") {
include "**/*"
into "Licenses"
}
from ("${projectDir}/docs") {
include "**/*"
into "docs"
}
destinationDirectory = file("${buildDir}/dist")
archiveBaseName = "${jarname}"
}