-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
47 lines (38 loc) · 1.06 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
/*
* Copyright 2016 Year4000. All Rights Reserved.
*/
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+'
}
}
apply plugin: 'nebula-aggregate-javadocs'
apply from: file('gradle/utils.gradle')
ext.mapnodes = project
ext.rawVersion = '3.0.0'
defaultTasks 'assemble'
/** All child projects */
subprojects {
group 'net.year4000.mapnodes'
version = rawVersion + '-' + git()
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
}
// Build the Docker image dont use docker-compose
task buildDocker(type: Exec) {
standardInput System.in
commandLine 'docker', 'build', '--rm', '--file', 'Dockerfile', '--tag', 'year4000/mapnodes:spongevanilla', '.'
}
// Run the docker insance
task runDocker(type: Exec) {
standardInput System.in
commandLine 'docker-compose', 'run', '--publish', '25565:25565', '--publish', '5005:5005', '--rm', 'mapnodes'
}
// Combine building and running
task buildRunDocker {
dependsOn 'buildDocker'
dependsOn 'runDocker'
}