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
|
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'
}
}
dependencies {
compile files("libs/EquivalentExchange3-1.7.10-0.3.496.jar")
}
apply plugin: "curseforge"
apply plugin: 'forge'
project.ext {
massive = "1"
major = "0"
minor = "9"
mcVersion = "1.7.10"
}
if (System.getenv().BUILD_NUMBER != null) {
version += "-${System.getenv().BUILD_NUMBER}"
} else {
version += "-err"
}
version = "${project.ext.massive}.${project.ext.major}.${project.minor}"
group= "darkknight.jewelrycraft2"
archivesBaseName = "Jewelrycraft2"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
minecraft {
version = "1.7.10-10.13.3.1395-1710ls"
assetDir = "minecraft/assets"
// replacing stuff in the source
replace '@MASSIVE@', project.massive
replace '@MAJOR@', project.major
replace '@MINOR@', project.minor
replace '@MC_VERSION@', version
if (System.getenv("BUILD_NUMBER") != null) {
replace '@BUILD_NUMBER@', System.getenv("BUILD_NUMBER")
} else {
replace '@BUILD_NUMBER@', 0
}
}
processResources{
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
curse {
apiKey = System.getenv("onyxdarkknight_curse")
projectId = "229927" // my project url is http://minecraft.curseforge.com/mc-mods/229927-jewelrycraft-2
changelog = new File('Changelog.txt').text
releaseType = "release"
// the default obfuscated jar is uploaded by default
// artifact = project.file("some/jar/to/upload.jar")
// allows you to add extra compatible MC versions. The one specified in the minecraft{} block is used by default.
// addGameversion "1.7.0", "1.7.4"
}
sourceSets {
main {
output.resourcesDir = output.classesDir
java {
srcDir 'java'
}
resources {
srcDir 'resources'
}
}
}
jar {
appendix = "${project.ext.mcVersion}"
classifier = 'universal'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'src'
from sourceSets.main.allSource
}
task devJar(type: Jar) {
classifier = 'dev'
from sourceSets.main.output
}
artifacts {
archives sourcesJar, devJar
}
|