This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
98 lines (83 loc) · 2.44 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
/*
* Copyright 2017 Dries007
*
* Licensed under the EUPL, Version 1.1 only (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/software/page/eupl5
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing
* permissions and limitations under the Licence.
*/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
sourceCompatibility = 1.7
archivesBaseName = 'CurseModpackDownloader'
group = 'net.dries007.cmd'
def buildNr = System.getenv().BUILD_NUMBER ?: 'SNAPSHOT'
version = '1.0.8.' + buildNr
configurations {
compile
deployJars
}
repositories {
mavenCentral()
}
dependencies {
compile group: "com.google.code.gson", name: "gson", version: "2.8.0"
compile group: "org.apache.commons", name: "commons-io", version: "1.3.2"
compile group: "com.beust", name: "jcommander", version: "1.64"
compile group: "net.lingala.zip4j", name: "zip4j", version: "1.3.2"
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include '*.properties'
expand 'version': project.version, 'build': System.getenv().BUILD_NUMBER
}
}
ext.sharedManifest = manifest {
attributes(
"Specification-Title": project.name,
"Specification-Version": project.version,
"Specification-Vendor": "Dries007",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "Dries007",
"Main-Class": project.group + ".Main",
"Dependencies": configurations.runtime.allDependencies.collect { "${it.group}:${it.name}:${it.version}" }.join(',')
)
}
jar {
from "LICENSE"
manifest {
from sharedManifest
}
}
task sourcesJar(type: Jar) {
classifier = 'src'
from "LICENSE"
from sourceSets.main.allSource
manifest {
from sharedManifest
}
}
task fatJar(type: Jar) {
classifier = 'all'
from "LICENSE"
from configurations.runtime.asFileTree.files.collect { zipTree(it) }
manifest {
from sharedManifest
}
with jar
}
artifacts {
archives jar
archives sourcesJar
archives fatJar
}