forked from sfPlayer1/Matcher
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
143 lines (121 loc) · 4.05 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
131
132
133
134
135
136
137
138
139
140
141
142
143
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id "checkstyle"
id 'org.openjfx.javafxplugin'
id 'com.github.johnrengelman.shadow'
id 'org.gradlex.extra-java-module-info'
}
repositories {
mavenCentral()
maven {
name "Fabric"
url 'https://maven.fabricmc.net/'
}
}
archivesBaseName = 'matcher'
group = 'net.fabricmc'
def ENV = System.getenv()
checkstyle {
configFile = project.file("checkstyle.xml")
toolVersion = project.checkstyle_version
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
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 "org.ow2.asm:asm:${asm_version}"
api "org.ow2.asm:asm-tree:${asm_version}"
api "org.slf4j:slf4j-api:${slf4j_version}"
api "net.fabricmc:mapping-io:${mappingio_version}"
implementation "org.ow2.asm:asm-commons:${asm_version}"
implementation "org.ow2.asm:asm-util:${asm_version}"
implementation "com.github.javaparser:javaparser-core:${javaparser_version}"
implementation "net.fabricmc:cfr:${fabric_cfr_version}"
implementation "org.vineflower:vineflower:${vineflower_version}"
implementation "org.bitbucket.mstrobel:procyon-compilertools:${procyon_version}"
implementation ("io.github.skylot:jadx-core:${jadx_version}") {
exclude group: 'com.android.tools.build', module: 'aapt2-proto'
}
implementation ("io.github.skylot:jadx-java-input:${jadx_version}") {
exclude group: 'io.github.skylot', module: 'raung-disasm'
}
runtimeOnly "org.tinylog:tinylog-impl:${tinylog_version}"
runtimeOnly "org.tinylog:slf4j-tinylog:${tinylog_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 {
failOnMissingModuleInfo.set(false) // because of transitive dependencies
// CFR
automaticModule("net.fabricmc:cfr", "cfr")
// Vineflower
automaticModule("org.vineflower:vineflower", "org.vineflower.vineflower")
// Procyon
automaticModule("org.bitbucket.mstrobel:procyon-compilertools", "procyon.compilertools")
// JADX
automaticModule("io.github.skylot:jadx-core", "jadx.core")
automaticModule("io.github.skylot:jadx-plugins-api", "jadx.plugins.api")
automaticModule("io.github.skylot:jadx-java-input", "jadx.plugins.java_input")
}
application {
mainModule = 'matcher'
mainClass = 'matcher.Main'
}
jar {
processResources.exclude('tinylog-dev.properties')
}
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
}
}
}
}
}