forked from WeaveMC/unpick
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
82 lines (69 loc) · 1.99 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
plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse'
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group = 'net.fabricmc.unpick'
def ENV = System.getenv()
version = "2.3.1"
version = version + (ENV.GITHUB_ACTIONS ? "" : "+local")
repositories {
mavenCentral()
}
dependencies {
api 'org.ow2.asm:asm:9.6'
api 'org.ow2.asm:asm-tree:9.6'
implementation 'org.ow2.asm:asm-commons:9.6'
implementation 'org.ow2.asm:asm-util:9.6'
// Use JUnit test framework
testImplementation platform('org.junit:junit-bom:5.10.1')
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = 8
}
}
java {
withSourcesJar()
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
repositories {
if (ENV.MAVEN_URL) {
repositories.maven {
name "fabric"
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact(javadocJar)
}
}
}
}
dependencies {
implementation project(':unpick-format-utils')
}