-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (74 loc) · 2.06 KB
/
Copy pathbuild.gradle
File metadata and controls
86 lines (74 loc) · 2.06 KB
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
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') {
changing = true
}
}
}
apply plugin: 'forge'
apply plugin: 'java'
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
version = '1.5.3'
/* A.B.C.D
A = Major version
B = Adding content or researches/recipes
C = Recipes tweaks, edits or integrations
D = Bug patches
E = Forgotten things/typos
*/
group = "com.thenemex.tcreborn" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Thaumic_Renaissance"
// +SETTINGS
def domain = 'com.thenemex.tcreborn' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
def modid = 'modid'
def mcversion = '1.7.10'
// -SETTINGS
group = "${domain}.${modid}"
archivesBaseName = "[${mcversion}] Thaumic_Renaissance" // add Minecraft version to jar for better user friendliness
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
subprojects {
apply plugin: 'idea'
}
task prepareAssets(type: Copy) {
group = 'build'
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':mcversion
}
from project.file('src/main/resources')
into project.file('build/classes/java/main')
}
classes.dependsOn(prepareAssets)
// replace values in mcmod.info before packing in jar
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':mcversion
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}