forked from MCreator/MCreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
146 lines (120 loc) · 6.29 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
144
145
146
plugins {
id "java"
id "idea"
id "de.undercouch.download" version "5.0.2"
id 'edu.sc.seis.launch4j' version '2.5.2'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.3'
id 'org.openjfx.javafxplugin' version '0.0.12'
}
repositories {
maven { url "https://repo.gradle.org/gradle/libs-releases-local/" }
maven { url "https://maven.scijava.org/content/repositories/public/" }
flatDir { dirs 'lib' }
}
project.ext.mcreatorconf = new Properties()
file('src/main/resources/mcreator.conf').withInputStream { project.mcreatorconf.load(it) }
group = 'net.mcreator'
version = project.mcreatorconf.getProperty('mcreator')
project.ext.builddate = new Date().format('wwuHH')
javadoc.source = sourceSets.main.allJava
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
sourceCompatibility = 17
targetCompatibility = 17
// workaround for IDEA-265203
System.setProperty("user.dir", projectDir.toString())
idea {
module {
inheritOutputDirs = true
excludeDirs = [file(".gradle"), file(".idea"), file(".github"), file("build"),
file("gradle"), file("jdk"), file("license"), file("logs")] as Set<File>
}
}
configurations {
testImplementation.extendsFrom compileOnly
provided
compileOnly.extendsFrom provided
runtimeOnly.extendsFrom provided
export.extendsFrom implementation
export.canBeResolved = true
win64
mac64
linux64
}
dependencies {
// from lib folder
implementation fileTree(dir: 'lib', include: ['*.jar'])
// from maven
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation group: 'foxtrot', name: 'foxtrot-core', version: '4.0'
implementation group: 'org.freemarker', name: 'freemarker', version: '2.3.31'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'com.github.sps.junidecode', name: 'junidecode', version: '0.3'
implementation group: 'org.jboss.forge.roaster', name: 'roaster-api', version: '2.23.2.Final'
implementation group: 'org.jboss.forge.roaster', name: 'roaster-jdt', version: '2.23.2.Final'
implementation group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version: '1.15'
implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
implementation group: 'de.javagl', name: 'obj', version: '0.3.0'
implementation group: 'com.univocity', name: 'univocity-parsers', version: '2.9.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9'
implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '6.1.0.202203080745-r'
implementation group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.36'
implementation group: 'org.gradle', name: 'gradle-tooling-api', version: '7.1.1'
implementation group: 'net.java.balloontip', name: 'balloontip', version: '1.2.4.1'
implementation group: 'com.atlassian.commonmark', name: 'commonmark', version: '0.17.0'
implementation group: 'com.atlassian.commonmark', name: 'commonmark-ext-autolink', version: '0.17.0'
implementation group: 'com.atlassian.commonmark', name: 'commonmark-ext-gfm-tables', version: '0.17.0'
implementation group: 'club.minnced', name: 'java-discord-rpc', version: '2.0.2'
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.2.0'
implementation group: 'com.fifesoft', name: 'autocomplete', version: '3.2.0'
implementation(group: 'com.fifesoft', name: 'languagesupport', version: '3.1.4') {
dep -> dep.exclude group: 'org.mozilla', module: 'rhino'
}
// test dependencies
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.8.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
// JFX natives
win64 group: 'org.openjfx', name: 'javafx-base', version: '18', classifier: 'win'
win64 group: 'org.openjfx', name: 'javafx-controls', version: '18', classifier: 'win'
win64 group: 'org.openjfx', name: 'javafx-graphics', version: '18', classifier: 'win'
win64 group: 'org.openjfx', name: 'javafx-media', version: '18', classifier: 'win'
win64 group: 'org.openjfx', name: 'javafx-web', version: '18', classifier: 'win'
win64 group: 'org.openjfx', name: 'javafx-swing', version: '18', classifier: 'win'
mac64 group: 'org.openjfx', name: 'javafx-base', version: '18', classifier: 'mac'
mac64 group: 'org.openjfx', name: 'javafx-controls', version: '18', classifier: 'mac'
mac64 group: 'org.openjfx', name: 'javafx-graphics', version: '18', classifier: 'mac'
mac64 group: 'org.openjfx', name: 'javafx-media', version: '18', classifier: 'mac'
mac64 group: 'org.openjfx', name: 'javafx-web', version: '18', classifier: 'mac'
mac64 group: 'org.openjfx', name: 'javafx-swing', version: '18', classifier: 'mac'
linux64 group: 'org.openjfx', name: 'javafx-base', version: '18', classifier: 'linux'
linux64 group: 'org.openjfx', name: 'javafx-controls', version: '18', classifier: 'linux'
linux64 group: 'org.openjfx', name: 'javafx-graphics', version: '18', classifier: 'linux'
linux64 group: 'org.openjfx', name: 'javafx-media', version: '18', classifier: 'linux'
linux64 group: 'org.openjfx', name: 'javafx-web', version: '18', classifier: 'linux'
linux64 group: 'org.openjfx', name: 'javafx-swing', version: '18', classifier: 'linux'
}
javafx {
version = "18"
modules = ['javafx.web', 'javafx.swing']
configuration = 'provided' // we provide natives during deployment or with SDK
}
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
testLogging.exceptionFormat = 'full'
maxHeapSize = "1024m"
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.runtimeClasspath
}
task runMCreator(type: JavaExec, dependsOn: jar) {
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
classpath += sourceSets.main.runtimeClasspath
main = "net.mcreator.Launcher"
}
apply from: 'platform/setup.gradle'
apply from: 'platform/export.gradle'