-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
76 lines (58 loc) · 1.98 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
plugins {
id 'java'
id "de.undercouch.download" version "5.6.0"
}
group 'ilya246'
version '2.0'
sourceSets.main.java.srcDirs = ["src"]
repositories {
mavenLocal()
mavenCentral()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url 'https://repo.spongepowered.org/repository/maven-public/' }
maven { url 'https://jitpack.io' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" }
}
ext {
mindustryVersion = "v146"
}
dependencies {
compileOnly("com.github.anuken.Arc:arc-core:$mindustryVersion")
compileOnly("com.github.anuken.mindustry:core:$mindustryVersion")
}
configurations.configureEach {
resolutionStrategy.eachDependency { details ->
if(details.requested.group == 'com.github.Anuken.Arc') details.useVersion("$mindustryVersion")
}
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
tasks.register('downloadServer', Download) {
src 'https://github.com/Anuken/Mindustry/releases/download/v146/server-release.jar'
dest new File(project.rootDir, 'test/server-release.jar')
overwrite true
}
tasks.register("moveMod", Copy){
from "${project.buildDir}/libs"
into "${project.rootDir}/test/config/mods"
}
tasks.register("runServer", Exec){
workingDir = file('test')
commandLine 'java', '-jar', 'server-release.jar', 'host'
// Inherit input/output streams
standardInput = System.in
standardOutput = System.out
errorOutput = System.err
}
jar {
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName = "CrawlerArenaPlugin.jar"
from configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
from("$rootDir/src/resources"){
include "**"
}
}