-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.gradle
47 lines (39 loc) · 1011 Bytes
/
common.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
// This file is to be applied to every subproject.
String mavenGroupId = 'bm.gradar'
String mavenVersion = '1.0'
apply plugin: 'java'
apply plugin: 'forge'
minecraft {
version="1.7.10-10.13.2.1230"
if(file('../run').exists()) {
runDir="../run/assets"
} else {
runDir="assets"
}
}
String mavenArtifactId = name
group = mavenGroupId
version = mavenVersion
task sourcesJar(type:Jar, dependsOn:classes, description:'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
configure(install.repositories.mavenInstaller) {
pom.project {
groupId = mavenGroupId
artifactId = mavenArtifactId
version = mavenVersion
}
}
task createFolders(description:'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}