forked from AbrarSyed/SecretRoomsMod-forge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
168 lines (141 loc) · 4.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// this part adds in ForgeGradle
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' }
}
apply plugin: "forge"
// stuff specific to my mod
group = 'com.github.abrarsyed'
version = "4.7.1"
archivesBaseName = 'secretroomsmod'
minecraft {
version = "1.7.10-10.13.2.1291" // grab latest forge
runDir = "run"
// replacing
replace "@CHANGE_VERSION@", "[4.7,)"
replace "@MC_VERSION@", project.minecraft.version
replace "@VERSION@", project.version
replaceIn "SecretRooms.java"
}
// add some stuff to the version
// spit out the version for debugging sake
logger.lifecycle ""+version
version = "${minecraft.version}-$version.${System.getenv().BUILD_NUMBER}"
logger.lifecycle ""+version
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in text files, not binary ones.
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
// replace version and MCVersion
// forge version is also accessible via project.minecraftforgeVersion
// it contains the full minecraft version, including buildNumber
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not text
from(sourceSets.main.resources.srcDirs) { exclude '**/*.info' }
}
repositories {
maven { // The repo from which to get waila
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven { // the repo from which to get NEI and stuff
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
}
dependencies {
// waila
compile "mcp.mobius.waila:Waila:1.5.8_1.7.10"
// malisis doors
compile 'net.malisis:malisisdoors:1.7.10-1.4.3:dev'
}
// because the normal output has been made to be obfuscated
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}
// add a source jar
task sourceJar(type: Jar, dependsOn: "sourceMainJava") {
from "build/sources/java"
classifier = 'sources'
}
// add a javadoc jar
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
// deployement stuff
configurations { deployerJars }
dependencies { deployerJars "org.apache.maven.wagon:wagon-ssh:2.2" }
artifacts {
archives sourceJar
archives deobfJar
archives javadocJar
}
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: "http://files.minecraftforge.net/maven/manage/upload") {
authentication(userName: "AbrarSyed", password: project.hasProperty(forgeMavenPass) ? null : project.getProperty('forgeMavenPass')) // the elvis operator. look it up.
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'SecretRoomsMod '
url 'https://github.com/AbrarSyed/SecretRoomsMod-forge'
scm {
url 'https://github.com/AbrarSyed/SecretRoomsMod-forge'
connection 'scm:git:git://github.com/AbrarSyed/SecretRoomsMod-forge.git'
developerConnection 'scm:git:[email protected]:AbrarSyed/SecretRoomsMod-forge.git'
}
issueManagement {
system 'github'
url 'https://github.com/AbrarSyed/SecretRoomsMod-forge/issues'
}
licenses {
license {
name 'The Eclipse Public Liscence'
url 'http://www.eclipse.org/legal/epl-v10.html'
distribution 'repo'
}
}
developers {
developer {
id 'AbrarSyed'
name 'AbrarSyed'
roles { role 'developer' }
}
developer {
id 'AlexBegt'
name 'AlexBegt'
roles { role 'contributor' }
}
developer {
id 'CaptainShadows'
name 'CaptainShadows'
roles { role 'contributor' }
}
}
}
}
}
}
}