-
Notifications
You must be signed in to change notification settings - Fork 2
/
shared.build.gradle
95 lines (75 loc) · 1.69 KB
/
shared.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
/*
* This base configuration file is inherited by all projects, i.e. the root project and sub-projects.
* Configuration common to all of them should be added here.
*/
// --------------- Plugins ---------------
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = 'org.dyvil'
// --------------- Dependencies ---------------
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
// --------------- Publishing ---------------
java {
withSourcesJar()
withJavadocJar()
}
signing {
sign publishing.publications
}
publishing {
publications {
create('mavenJava', MavenPublication) {
from(components.java)
pom {
name = project.name
url = 'https://github.com/Dyvil/Dyvil'
inceptionYear = '2014'
scm {
url = 'https://github.com/Dyvil/Dyvil'
}
licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'Clashsoft'
name = 'Adrian Kunz'
}
}
}
}
}
}
afterEvaluate {
publishing.publications.mavenJava.pom.description.set(project.description)
}
// --------------- Tasks ---------------
tasks.register('version') {
it.doLast {
println version
}
}
// --------------- Java Compilation ---------------
tasks.withType(JavaCompile) {
options.compilerArgs.addAll(
'-parameters', // generates parameter attributes and names
'-XDignore.symbol.file' // disables "proprietary API" warnings
)
options.fork = true
}
// --------------- Jar ---------------
tasks.withType(Jar) {
preserveFileTimestamps = false
from(rootProject.rootDir) {
include 'LICENSE.md'
include 'thirdparty/*LICENSE*'
}
}