Skip to content

Commit

Permalink
Added ForestryAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
IceDragon200 committed Feb 11, 2016
1 parent c41cf95 commit 9e1ea69
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "api/thaumcraft/api"]
path = api/thaumcraft/api
url = https://github.com/Azanor/thaumcraft-api.git

[submodule "api/ForestryAPI"]
path = api/thaumcraft/api
url = https://github.com/ForestryMC/ForestryAPI.git
1 change: 1 addition & 0 deletions api/ForestryAPI
Submodule ForestryAPI added at 1c9fb5
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ ext.growthcraftApi = "src/java/growthcraft/api"
ext.thaumcraftApi = "api/thaumcraft/api"
ext.thaumcraftApiExclusionPattern = "**/thaumcraft/api/**"

ext.forestryApiRoot = "api/ForestryAPI"
ext.forestryApi = "api/ForestryAPI/forestry/api"
ext.forestryApiExclusionPattern = "**/forestry/api/**"

minecraft {
version = minecraft_forge_version
runDir = "run"
Expand All @@ -88,6 +92,7 @@ sourceSets {
api {
java {
srcDir project.growthcraftApi
srcDir project.forestryApi
srcDir project.thaumcraftApi
}
}
Expand All @@ -111,7 +116,7 @@ dependencies {

testCompile "junit:junit:4.11"
}

/*
runClient {
if( project.hasProperty("mcUsername") && project.hasProperty("mcPassword") ) {
args "--username=${project.mcUsername}"
Expand All @@ -125,7 +130,7 @@ debugClient {
args "--username=${project.mcUsername}"
args "--password=${project.mcPassword}"
}
}
}*/

// --------------------
// extra jar section
Expand All @@ -141,6 +146,7 @@ tasks.withType(JavaCompile) {
task sourceJar(type: Jar) {
from sourceSets.main.allSource
from(sourceSets.api.allSource) {
exclude project.forestryApiExclusionPattern
exclude project.thaumcraftApiExclusionPattern
}
classifier = "sources"
Expand All @@ -150,6 +156,7 @@ javadoc {
// add api classes to javadoc
source += sourceSets.api.allSource
// exclude 3rd party apis from the javadoc
exclude project.forestryApiExclusionPattern
exclude project.thaumcraftApiExclusionPattern

failOnError = false
Expand All @@ -165,13 +172,15 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
task deobfJar(type: Jar) {
from sourceSets.main.output
from(sourceSets.api.output) {
exclude project.forestryApiExclusionPattern
exclude project.thaumcraftApiExclusionPattern
}
classifier = "dev"
}

task apiJar(type: Jar) {
from(sourceSets.api.output) {
exclude project.forestryApiExclusionPattern
exclude project.thaumcraftApiExclusionPattern
}
classifier = "api"
Expand All @@ -182,13 +191,17 @@ jar {

// add api classes to main package
from(sourceSets.api.output) {
exclude project.forestryApiExclusionPattern
exclude project.thaumcraftApiExclusionPattern
}

// Only include the thaumcraft LICENSE
into("thaumcraft/api") {
from project.thaumcraftApi + "/LICENSE"
}
into("forestry/api") {
from project.forestryApiRoot + "/LICENSE.txt"
}
}

// make sure all of these happen when we run build
Expand Down
1 change: 1 addition & 0 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<suppressions>
<!-- Ignore 3rd party apis, its the wild west there -->
<suppress files="[\\/]api[\\/]thaumcraft" checks="."/>
<suppress files="[\\/]api[\\/]ForestryAPI" checks="."/>
</suppressions>

0 comments on commit 9e1ea69

Please sign in to comment.