forked from FabricMC/name-proposal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (63 loc) · 1.33 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
plugins {
id 'java'
id 'checkstyle'
id 'maven-publish'
id "com.diffplug.spotless" version "5.8.2"
}
sourceCompatibility = 16
targetCompatibility = 16
group 'net.fabricmc'
archivesBaseName = 'name-proposal'
def ENV = System.getenv()
version '0.1.0' + (ENV.GITHUB_ACTIONS ? "" : "+local")
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
}
dependencies {
implementation 'org.ow2.asm:asm:9.2'
implementation 'org.ow2.asm:asm-commons:9.2'
implementation 'org.ow2.asm:asm-tree:9.2'
implementation 'org.ow2.asm:asm-util:9.2'
implementation 'net.fabricmc:mapping-io:0.2.1'
compileOnly 'cuchaz:enigma:1.4.4'
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
}
java {
withSourcesJar()
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator(", ")
}
}
checkstyle {
configFile = project.file("checkstyle.xml")
toolVersion = "9.0"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
if (ENV.MAVEN_URL) {
repositories.maven {
name "fabric"
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
}
}
}
}