forked from AgriCraft/AgriCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (106 loc) · 3.27 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
// Retrieve plugins for gradle.
buildscript {
repositories {
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
// Setup required project resources.
repositories {
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
maven {
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven {
name "Squeek"
url "http://www.ryanliptak.com/maven/"
}
ivy {
name "MineTweaker3"
artifactPattern "http://minetweaker3.powerofbytes.com/download/[module]-[revision].[ext]"
}
}
apply plugin: 'forge'
apply plugin: 'java'
apply from: 'automation.gradle'
// Set build properties.
sourceCompatibility = version_java
targetCompatibility = version_java
ext.version_mod = "${version_mod_major}.${version_mod_minor}.${version_mod_revis}"
version = "${version_minecraft}-${version_mod}"
group = "com.InfinityRaider.AgriCraft"
archivesBaseName = "AgriCraft"
// Setup forge.
minecraft {
version = "${version_minecraft}-${version_forge}-${version_minecraft}"
runDir = "eclipse"
replaceIn "reference/Reference.java"
replace "@MAJOR@", version_mod_major
replace "@MINOR@", version_mod_minor
replace "@REVIS@", version_mod_revis
}
// Configure dependencies (build-only, shaded and packed libraries)
dependencies {
// Code Chicken
compile "codechicken:CodeChickenLib:${version_codeChickenLib}:dev"
compile "codechicken:CodeChickenCore:${version_codeChickenCore}:dev"
compile "codechicken:NotEnoughItems:${version_nei}:dev"
// Core
compile "mcp.mobius.waila:Waila:1.5.9_1.7.10:dev"
compile name: 'MineTweaker3', version: version_minetweaker, ext: 'jar'
// API
compile "applecore:AppleCore:${version_applecore}:api"
}
// Configure Resource Processing.
processResources {
inputs.property "version", project.version_mod
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand ([
'version': project.version_mod,
'mcversion': project.minecraft.version
])
}
// Don't ask me why this can't go in the other from...
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// Compile the jar for the APIs
task apiJar(type: Jar) {
from sourceSets.main.allSource
from sourceSets.main.output
include 'com/InfinityRaider/AgriCraft/api/**/*'
classifier = 'api'
}
// Tell build that it needs the API compiled first.
build.dependsOn apiJar
// Javadoc
task mainAgriCraftJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
title = "AgriCraft ${version_mod} Documentation"
destinationDir = file("${project.docsDir}/mainJavadoc")
failOnError = false
}
task apiAgriCraftJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
include "**/api/**"
title = "AgriCraft ${version_mod} API Documentation"
destinationDir = file("${project.docsDir}/apiJavadoc")
failOnError = false
}