-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
91 lines (79 loc) · 2.11 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
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
}
}
apply plugin: 'java'
apply plugin: 'forge'
apply plugin: 'maven'
group = 'jkmau5.modjam'
version = '0.2-SNAPSHOT'
archivesBaseName = 'RadioMod'
minecraft{
version = '1.6.4-9.11.1.964'
assetDir = 'runtime/client/assets'
replace "@VERSION@", project.version
replaceIn 'Constants.java'
}
jar {
manifest {
attributes 'Version': project.version
}
if (project.hasProperty("signmod")) {
logger.info("Signing jar")
doLast {
ant.signjar(jar: jar.archivePath, alias: 'jkmau5', keystore: project.signmod.keystoreLocation, storepass: project.signmod.keystoreLocation)
}
}
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'version.properties'
include '**/**.lang'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'version.properties'
exclude '**/**.lang'
}
}
uploadArchives {
if (project.hasProperty("filesmaven")) {
logger.info('Deploying to file server')
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "scp://maven.reening.nl/media/maven/") {
authentication(userName: project.filesmaven.mavenUsername, password: project.filesmaven.mavenPassword)
}
}
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
appendix = 'src'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
appendix = 'javadoc'
from 'build/docs/javadoc'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
appendix = 'dev'
}
artifacts {
archives sourceJar
archives deobfJar
archives javadocJar
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}