forked from sfPlayer1/Matcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (108 loc) · 3.49 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
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id "checkstyle"
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'de.jjohannes.extra-java-module-info' version '0.16'
}
repositories {
mavenCentral()
maven {
name "Fabric"
url 'https://maven.fabricmc.net/'
}
}
archivesBaseName = 'matcher'
group = 'net.fabricmc'
def ENV = System.getenv()
sourceSets {
main {
java.srcDirs = ['src']
resources.srcDirs = ['res']
}
}
checkstyle {
configFile = project.file("checkstyle.xml")
toolVersion = project.checkstyle_version
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 11
}
javafx {
version = javafx_version
modules = [ 'javafx.controls', 'javafx.web' ]
// Don't include native binaries via the plugin,
// since it will only include those for the current OS.
// The full set of native libraries gets shadowed a few lines beneath.
configuration = 'compileOnly'
}
dependencies {
api "com.github.javaparser:javaparser-core:${javaparser_version}"
api "net.fabricmc:cfr:${fabric_cfr_version}"
api "net.fabricmc:fabric-fernflower:${fabric_fernflower_version}"
api "net.fabricmc:mapping-io:${mappingio_version}"
api "org.bitbucket.mstrobel:procyon-compilertools:${procyon_version}"
api "org.ow2.asm:asm:${asm_version}"
api "org.ow2.asm:asm-commons:${asm_version}"
api "org.ow2.asm:asm-tree:${asm_version}"
api "org.ow2.asm:asm-util:${asm_version}"
// JavaFX for all platforms (needed for cross-platform fat jar)
runtimeOnly "org.openjfx:javafx-base:${javafx_version}:win"
runtimeOnly "org.openjfx:javafx-base:${javafx_version}:mac"
runtimeOnly "org.openjfx:javafx-base:${javafx_version}:linux"
runtimeOnly "org.openjfx:javafx-graphics:${javafx_version}:win"
runtimeOnly "org.openjfx:javafx-graphics:${javafx_version}:mac"
runtimeOnly "org.openjfx:javafx-graphics:${javafx_version}:linux"
runtimeOnly "org.openjfx:javafx-controls:${javafx_version}:win"
runtimeOnly "org.openjfx:javafx-controls:${javafx_version}:mac"
runtimeOnly "org.openjfx:javafx-controls:${javafx_version}:linux"
runtimeOnly "org.openjfx:javafx-web:${javafx_version}:win"
runtimeOnly "org.openjfx:javafx-web:${javafx_version}:mac"
runtimeOnly "org.openjfx:javafx-web:${javafx_version}:linux"
runtimeOnly "org.openjfx:javafx-media:${javafx_version}:win"
runtimeOnly "org.openjfx:javafx-media:${javafx_version}:mac"
runtimeOnly "org.openjfx:javafx-media:${javafx_version}:linux"
}
extraJavaModuleInfo {
automaticModule("cfr-${fabric_cfr_version}.jar", "cfr")
automaticModule("procyon-core-${procyon_version}.jar", "procyon.core")
automaticModule("procyon-compilertools-${procyon_version}.jar", "procyon.compilertools")
automaticModule("fabric-fernflower-${fabric_fernflower_version}.jar", "intellij.fernflower")
automaticModule("mapping-io-${mappingio_version}.jar", "net.fabricmc.mappingio")
}
application {
mainModule = 'matcher'
mainClass = 'matcher.Main'
}
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
}
}
}
}
}