-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
140 lines (119 loc) · 3.89 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
buildscript {
ext.kotlin_version = '1.0.5-2'
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'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'forge'
version = "0.0.2"
group = "pharaun.Gregtania"
archivesBaseName = "Gregtania"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceSets {
main {
java.srcDirs = ['src/main/java']
resources.srcDirs = ['src/main/resources']
resources.excludes = ['*']
kotlin.srcDirs = ['src/main/java']
}
}
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
configurations {
external
compile.extendsFrom external
}
repositories {
mavenCentral()
maven {
name = "codechicken"
url = "http://chickenbones.net/maven"
}
maven {
name = "mobiusstrip"
url = "http://mobiusstrip.eu/maven/"
}
}
dependencies {
// Kotlin
external "org.jetbrains.kotlin:kotlin-runtime:$kotlin_version"
external "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Minecraft
compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
// Chicken bones
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
}
jar {
manifest {
attributes 'Built-By': 'pharaun666'
attributes 'Build-Date': new Date().format("yyyy-MM-dd HH:mm:ss")
attributes 'Built-JDK': System.getProperty('java.version')
attributes 'Implementation-Title': project.name
// attributes 'Implementation-URL': 'https://github.com/Electrical-Age'
// attributes 'Implementation-Vendor': 'Electrical-Age Team'
// attributes 'Implementation-Vendor-Id': 'net.electricalage.eln'
// attributes 'Project-Url': 'https://electrical-age.net/'
attributes 'Source-Compatibility': project.sourceCompatibility
attributes 'Target-Compatibility': project.targetCompatibility
}
// Copy libs jar files
from { configurations.external.collect { it.isDirectory() ? it : zipTree(it) } }
exclude(['ic2/**', 'li/**', 'buildcraft/**'])
// Add README and LICENSE to the release jar
from(['README.md', 'LICENSE.md'])
// Asset whitelist to copy the required asset files into the release jar.
// Ignore files not used in Minecraft to reduce the release jar size.
// Copy main files
from('src/main/resources/assets/gregtania/') {
include 'logo.png'
into 'assets/gregtania/'
}
// Copy language files
from('src/main/resources/assets/gregtania/lang') {
include '*.lang'
into 'assets/gregtania/lang'
}
// Copy texture
from('src/main/resources/assets/gregtania/textures') {
include '**/*.png'
into 'assets/gregtania/textures'
}
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
idea {
module {
inheritOutputDirs = true
}
}