forked from CraftTweaker/ZenScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (96 loc) · 2.72 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
version = "1.0.0"
if(project.hasProperty("craftTweakerVersion")){
version = ext.craftTweakerVersion
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
//Shuts up javadoc failures
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
repositories {
mavenCentral()
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
compile group: 'org.ow2.asm', name: 'asm-debug-all', version: '5.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
// compile 'org.ow2.asm:asm-debug-all:6.0_BETA'
testCompile(
'org.junit.jupiter:junit-jupiter-api:5.0.1'
)
testRuntime(
'org.junit.jupiter:junit-jupiter-engine:5.0.1',
'org.junit.vintage:junit-vintage-engine:4.12.1',
'org.junit.platform:junit-platform-launcher:1.0.1',
'org.junit.platform:junit-platform-runner:1.0.1'
)
//compile files("${System.properties['java.home']}/../lib/tools.jar")
//compile files("libs/tools.jar")
}
task sourcesJar(type: Jar, dependsOn: classes) {
description = 'Creates a JAR containing the source code.'
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
description = 'Creates a JAR containing the JavaDocs.'
from javadoc.destinationDir
classifier = 'javadoc'
}
task deobfJar(type: Jar) {
description = 'Creates a JAR containing the non-obfuscated compiled code.'
from sourceSets.main.output
classifier = "deobf"
}
//Adds the artifact types added by this script to the actual artifacts list.
artifacts {
archives sourcesJar
archives javadocJar
archives deobfJar
}
test {
useJUnitPlatform()
testLogging{
events "PASSED", "FAILED", "SKIPPED"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
// Adds the various artifacts
artifact sourcesJar {
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
artifact deobfJar {
classifier 'deobf'
}
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}