File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Java CI
2+
3+ on : [push]
4+
5+ jobs :
6+ buildJar :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - uses : actions/checkout@v1
11+ - name : Set up JDK 17
12+ uses : actions/setup-java@v1
13+ with :
14+ java-version : 17
15+ - name : Build plugin jar
16+ run : ./gradlew jar
17+ - name : Upload built jar file
18+ uses : actions/upload-artifact@v4
19+ with :
20+ name : ${{ github.event.repository.name }}
21+ path : build/libs/${{ github.event.repository.name }}.jar
Original file line number Diff line number Diff line change 1+ logs /
2+ /core /assets /mindustry-saves /
3+ /core /assets /mindustry-maps /
4+ /core /assets /bundles /output /
5+ /core /assets /.gifimages /
6+ /deploy /
7+ /desktop /packr-out /
8+ /desktop /packr-export /
9+ /desktop /mindustry-saves /
10+ /desktop /mindustry-maps /
11+ /desktop /gifexport /
12+ /core /lib /
13+ /ios /assets /
14+ /core /assets-raw /sprites /generated /
15+ /core /assets-raw /sprites_out /
16+ /annotations /build /
17+ /annotations /out /
18+ /net /build /
19+ /tools /build /
20+ /tests /build /
21+ /server /build /
22+ /test_files /
23+ /annotations /build /
24+ /desktop-sdl /build /
25+ desktop-sdl /build /
26+ /android /assets /mindustry-maps /
27+ /android /assets /mindustry-saves /
28+ /core /assets /gifexport /
29+ /core /assets /version.properties
30+ /core /assets /locales
31+ /ios /src /io /anuke /mindustry /gen /
32+ /core /src /io /anuke /mindustry /gen /
33+ ios /robovm.properties
34+ packr-out /
35+ config /
36+ * .gif
37+
38+ version.properties
39+
40+ .attach_ *
41+ # # Java
42+
43+ * .class
44+ * .war
45+ * .ear
46+ hs_err_pid *
47+ crash-report- *
48+
49+ # # Robovm
50+ /ios /robovm-build /
51+
52+ # # GWT
53+ /html /war /
54+ /html /gwt-unitCache /
55+ .apt_generated /
56+ .gwt /
57+ gwt-unitCache /
58+ www-test /
59+ .gwt-tmp /
60+
61+ # # Android Studio and Intellij and Android in general
62+ /android /libs /armeabi /
63+ /android /libs /armeabi-v7a /
64+ /android /libs /arm64-v8a /
65+ /android /libs /x86 /
66+ /android /libs /x86_64 /
67+ /android /gen /
68+ .idea /
69+ * .ipr
70+ * .iws
71+ * .iml
72+ /android /out /
73+ com_crashlytics_export_strings.xml
74+
75+ # # Eclipse
76+
77+ .classpath
78+ .project
79+ .metadata /
80+ /android /bin /
81+ /core /bin /
82+ /desktop /bin /
83+ /html /bin /
84+ /ios /bin /
85+ /ios-moe /bin /
86+ * .tmp
87+ * .bak
88+ * .swp
89+ * ~.nib
90+ .settings /
91+ .loadpath
92+ .externalToolBuilders /
93+ * .launch
94+
95+ # # NetBeans
96+
97+ /nbproject /private /
98+ /android /nbproject /private /
99+ /core /nbproject /private /
100+ /desktop /nbproject /private /
101+ /html /nbproject /private /
102+ /ios /nbproject /private /
103+ /ios-moe /nbproject /private /
104+
105+ /build /
106+ /android /build /
107+ /core /build /
108+ /desktop /build /
109+ /html /build /
110+ /ios /build /
111+ /ios-moe /build /
112+
113+ /nbbuild /
114+ /android /nbbuild /
115+ /core /nbbuild /
116+ /desktop /nbbuild /
117+ /html /nbbuild /
118+ /ios /nbbuild /
119+ /ios-moe /nbbuild /
120+
121+ /dist /
122+ /android /dist /
123+ /core /dist /
124+ /desktop /dist /
125+ /html /dist /
126+ /ios /dist /
127+ /ios-moe /dist /
128+
129+ /nbdist /
130+ /android /nbdist /
131+ /core /nbdist /
132+ /desktop /nbdist /
133+ /html /nbdist /
134+ /ios /nbdist /
135+ /ios-moe /nbdist /
136+
137+ nbactions.xml
138+ nb-configuration.xml
139+
140+ # # Gradle
141+
142+ /local.properties
143+ .gradle /
144+ gradle-app.setting
145+ /build /
146+ /android /build /
147+ /core /build /
148+ /desktop /build /
149+ /html /build /
150+ /ios /build /
151+ /ios-moe /build /
152+
153+ # # OS Specific
154+ .DS_Store
155+ Thumbs.db
156+ android /libs /
Original file line number Diff line number Diff line change 1+ ### Setup
2+
3+ Clone this repository first.
4+ To edit the plugin display name and other data, take a look at ` plugin.json ` .
5+ Edit the name of the project itself by going into ` settings.gradle ` .
6+
7+ ### Basic Usage
8+
9+ See ` src/example/ExamplePlugin.java ` for some basic commands and event handlers.
10+ Every main plugin class must extend ` Plugin ` . Make sure that ` plugin.json ` points to the correct main plugin class.
11+
12+ Please note that the plugin system is in beta, and as such is subject to changes.
13+
14+ ### Building a Jar
15+
16+ ` gradlew jar ` / ` ./gradlew jar `
17+
18+ Output jar should be in ` build/libs ` .
19+
20+
21+ ### Installing
22+
23+ Simply place the output jar from the step above in your server's ` config/mods ` directory and restart the server.
24+ List your currently installed plugins/mods by running the ` mods ` command.
Original file line number Diff line number Diff line change 1+ apply plugin : " java"
2+
3+ version ' 1.0'
4+
5+ sourceCompatibility = JavaVersion . VERSION_16
6+
7+ sourceSets. main. java. srcDirs = [" src" ]
8+
9+ compileJava. options. encoding = " UTF-8"
10+ compileTestJava. options. encoding = " UTF-8"
11+
12+ repositories {
13+ mavenCentral()
14+ maven{ url " https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" }
15+ maven{ url ' https://www.jitpack.io' }
16+ }
17+
18+ ext {
19+ // the build number that this plugin is made for
20+ mindustryVersion = ' v145'
21+ jabelVersion = " 93fde537c7"
22+ }
23+
24+ // java 8 backwards compatibility flag
25+ allprojects {
26+ tasks. withType(JavaCompile ){
27+ options. compilerArgs. addAll([' --release' , ' 8' ])
28+ }
29+ }
30+
31+ dependencies {
32+ compileOnly " com.github.Anuken.Arc:arc-core:$mindustryVersion "
33+ compileOnly " com.github.Anuken.Mindustry:core:$mindustryVersion "
34+ annotationProcessor " com.github.Anuken:jabel:$jabelVersion "
35+ }
36+
37+ jar {
38+ archiveFileName = " ${ project.archivesBaseName} .jar"
39+ from{
40+ configurations. runtimeClasspath. collect{it. isDirectory() ? it : zipTree(it)}
41+ }
42+
43+ from(rootDir){
44+ include " plugin.json"
45+ }
46+ }
Original file line number Diff line number Diff line change 1+ org.gradle.jvmargs =--illegal-access =permit \
2+ --add-exports =jdk.compiler/com.sun.tools.javac.api =ALL-UNNAMED \
3+ --add-exports =jdk.compiler/com.sun.tools.javac.code =ALL-UNNAMED \
4+ --add-exports =jdk.compiler/com.sun.tools.javac.model =ALL-UNNAMED \
5+ --add-exports =jdk.compiler/com.sun.tools.javac.processing =ALL-UNNAMED \
6+ --add-exports =jdk.compiler/com.sun.tools.javac.parser =ALL-UNNAMED \
7+ --add-exports =jdk.compiler/com.sun.tools.javac.util =ALL-UNNAMED \
8+ --add-exports =jdk.compiler/com.sun.tools.javac.tree =ALL-UNNAMED \
9+ --add-exports =jdk.compiler/com.sun.tools.javac.file =ALL-UNNAMED \
10+ --add-exports =jdk.compiler/com.sun.tools.javac.main =ALL-UNNAMED \
11+ --add-exports =jdk.compiler/com.sun.tools.javac.jvm =ALL-UNNAMED \
12+ --add-exports =jdk.compiler/com.sun.tools.javac.comp =ALL-UNNAMED \
13+ --add-exports =java.base/sun.reflect.annotation =ALL-UNNAMED
Original file line number Diff line number Diff line change 1+ distributionBase =GRADLE_USER_HOME
2+ distributionPath =wrapper/dists
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4+ zipStoreBase =GRADLE_USER_HOME
5+ zipStorePath =wrapper/dists
You can’t perform that action at this time.
0 commit comments