-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0926f79
Showing
21 changed files
with
1,390 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## .gitignore ## | ||
# ignore all | ||
* | ||
*/ | ||
|
||
# allow any | ||
!/BnnWidget | ||
!/src | ||
!/src/ | ||
!/gradle | ||
!/gradle/ | ||
!/lib | ||
!/lib/ | ||
!/libs | ||
!/libs/ | ||
!/annotations | ||
!/annotations/ | ||
!/version | ||
!/version/ | ||
!/info | ||
!/info/ | ||
!/build.gradle | ||
!/settings.gradle | ||
!/gradle.properties | ||
!/install.bat | ||
!/Release.bat | ||
!/gradlew | ||
!/gradlew.bat | ||
!/build.bat | ||
!/LICENSE | ||
!/LICENSE.md | ||
!/README | ||
!/README.md | ||
!/CONTRIBUTING | ||
!/CONTRIBUTING.md | ||
!/.gitignore | ||
!/.gitmodules | ||
!/.gitattributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "BnnWidget"] | ||
path = BnnWidget | ||
url = https://github.com/Team-Fruit/BnnWidget/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## .gitignore ## | ||
# ignore all | ||
* | ||
*/ | ||
|
||
# allow any | ||
!/src | ||
!/src/ | ||
!/gradle | ||
!/gradle/ | ||
!/lib | ||
!/lib/ | ||
!/version | ||
!/version/ | ||
!/info | ||
!/info/ | ||
!/build.gradle | ||
!/settings.gradle | ||
!/gradle.properties | ||
!/install.bat | ||
!/gradlew | ||
!/gradlew.bat | ||
!/install.bat | ||
!/build.bat | ||
!/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
call gradlew build | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
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 project.forgegradle | ||
} | ||
} | ||
|
||
apply plugin: 'forge' | ||
apply plugin: 'curseforge' | ||
|
||
// ext.build = System.getenv().BUILD_NUMBER ?: 'git' | ||
ext.modversion = "${project.version_major}.${project.version_minor}.${project.version_micro}" | ||
|
||
group = project.group | ||
version = "${project.version_minecraft}-${modversion}" | ||
compileJava.options.encoding = 'UTF-8' | ||
compileApiJava.options.encoding = 'UTF-8' | ||
|
||
idea { | ||
module { | ||
downloadSources = true | ||
inheritOutputDirs = true | ||
} | ||
} | ||
|
||
minecraft { | ||
version = "${project.version_minecraft}-${project.version_forge}" | ||
|
||
if (project.hasProperty('version_mappings')) | ||
mappings = project.version_mappings | ||
|
||
if (!project.hasProperty('run_location')) | ||
runDir = 'run' | ||
else | ||
runDir = run_location.replace('{modid}', project.modid).replace('{mcversion}', project.version_minecraft) | ||
|
||
replaceIn 'Reference.java' | ||
replace '${modid}', project.modid | ||
replace '${modname}', project.modname | ||
replace '${version}', modversion | ||
replace '${mcversion}', project.version_minecraft | ||
replace '${forgeversion}', project.version_forge | ||
} | ||
|
||
processResources { | ||
// this will ensure that this task is redone when the versions change. | ||
inputs.property 'version', project.version | ||
inputs.property 'mcversion', project.minecraft.version | ||
|
||
from(sourceSets.main.resources.srcDirs) { | ||
include 'mcmod.info' | ||
|
||
expand([ | ||
'modid' : project.modid, | ||
'modname' : project.modname, | ||
'version' : modversion, | ||
'mcversion' : project.version_minecraft, | ||
'forgeversion' : project.version_forge, | ||
'minforgeversion': project.hasProperty('version_minforge') ? project.version_minforge : project.version_forge, | ||
]) | ||
} | ||
|
||
from(sourceSets.main.resources.srcDirs) { | ||
exclude 'mcmod.info' | ||
} | ||
} | ||
|
||
def commonManifest = { | ||
if (project.hasProperty('extra_fmlcore')) | ||
attributes 'FMLCorePlugin': project.extra_fmlcore | ||
if (project.hasProperty('extra_fmlmod')) | ||
attributes 'FMLCorePluginContainsFMLMod': project.extra_fmlcore | ||
if (project.hasProperty('extra_fmlat')) | ||
attributes 'FMLAT': project.extra_fmlat | ||
} | ||
|
||
jar { | ||
from sourceSets.api.output | ||
classifier = project.hasProperty('extra_classifier') ? project.extra_classifier : 'universal' | ||
manifest commonManifest | ||
} | ||
|
||
task devJar(dependsOn: 'classes', type: Jar) { | ||
from sourceSets.main.output | ||
from sourceSets.api.output | ||
classifier = 'dev' | ||
manifest commonManifest | ||
} | ||
|
||
task sourceJar(dependsOn: 'classes', type: Jar) { | ||
from sourceSets.main.allSource | ||
from sourceSets.api.allSource | ||
classifier = 'sources' | ||
manifest commonManifest | ||
} | ||
|
||
task apiJar(dependsOn: 'classes', type: Jar) { | ||
from sourceSets.api.output | ||
classifier = 'api' | ||
manifest commonManifest | ||
} | ||
|
||
artifacts { | ||
archives devJar | ||
archives sourceJar | ||
archives apiJar | ||
} | ||
|
||
if (!project.hasProperty('keystore_location')) | ||
ext.keystore_location = '.' | ||
|
||
if (!project.hasProperty('keystore_alias')) | ||
ext.keystore_alias = '' | ||
|
||
if (!project.hasProperty('keystore_password')) | ||
ext.keystore_password = '' | ||
|
||
task signJars(dependsOn: ['reobf', 'devJar', 'sourceJar', 'apiJar']) { | ||
inputs.dir jar.destinationDir | ||
inputs.file keystore_location | ||
inputs.property 'keystore_alias', keystore_alias | ||
inputs.property 'keystore_password', keystore_password | ||
outputs.dir jar.destinationDir | ||
|
||
onlyIf { | ||
return keystore_location != '.' | ||
} | ||
|
||
doLast { | ||
jar.destinationDir.eachFile { file -> | ||
if (!file.getPath().endsWith('.jar')) | ||
return; | ||
|
||
logger.lifecycle "signing ${file}" | ||
ant.signjar( | ||
destDir: file.getParentFile(), | ||
jar: file, | ||
keystore: keystore_location, | ||
alias: keystore_alias, | ||
storepass: keystore_password | ||
) | ||
} | ||
} | ||
} | ||
|
||
if (!project.hasProperty('release_location')) | ||
ext.release_location = '.' | ||
else | ||
ext.release_location = release_location.replace('{modid}', project.modid).replace('{mcversion}', project.version_minecraft).replace('{version}', version) | ||
|
||
task release(dependsOn: 'signJars', type: Copy) { | ||
from project.tasks.jar.destinationDir | ||
into project.file(project.release_location) | ||
|
||
eachFile { file -> | ||
logger.lifecycle "copying ${file}" | ||
} | ||
|
||
onlyIf { | ||
return project.release_location != '.' | ||
} | ||
} | ||
|
||
if (project.hasProperty('api_key_curseforge') && project.hasProperty('extra_curseforge_id')) { | ||
curse { | ||
dependsOn signJars | ||
releaseType = project.hasProperty('extra_curseforge_releasetype') ? project.extra_curseforge_releasetype : 'release' | ||
apiKey = project.api_key_curseforge | ||
projectId = project.extra_curseforge_id | ||
changelog = '' | ||
|
||
additionalArtifact devJar, sourceJar, apiJar | ||
relatedProject 'lunatriuscore' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
forgegradle=net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT | ||
group=com.kamesuta.mc | ||
modid=bnnwidget | ||
modname=BnnWidget | ||
version_major=1 | ||
version_minor=0 | ||
version_micro=0 | ||
version_minecraft=1.7.10 | ||
version_forge=10.13.4.1558-1.7.10 | ||
version_minforge=10.13.4.1558 |
Oops, something went wrong.