Skip to content

Commit b9a0193

Browse files
committed
Initial commit
0 parents  commit b9a0193

25 files changed

Lines changed: 826 additions & 0 deletions

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# We don't want compiled stuff in here!
2+
/bin
3+
doc/info.txt
4+
/build
5+
/run
6+
7+
# Ignore project specific files
8+
.classpath
9+
.project
10+
.settings
11+
.pydevproject
12+
eclipse/*
13+
.gradle/*
14+
repo/*
15+
*.iml
16+
*.ipr
17+
*.iws
18+
out/*
19+
20+
# Ignore mac-specific file(s)
21+
.DS_Store
22+
23+
# Ignore files specific to dev environments
24+
gradle.properties
25+
build_number.properties
26+
changelog.txt

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Cyclops
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build.gradle

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
maven {
5+
name = "forge"
6+
url = "http://files.minecraftforge.net/maven"
7+
}
8+
maven {
9+
name = "sonatype"
10+
url = "https://oss.sonatype.org/content/repositories/snapshots/"
11+
}
12+
}
13+
dependencies {
14+
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
15+
}
16+
}
17+
18+
apply plugin: 'forge'
19+
20+
loadProperties()
21+
22+
version = config.mod_version
23+
group = "org.cyclops.structuredcrafting"
24+
archivesBaseName = "StructuredCrafting"
25+
sourceCompatibility = 1.7
26+
targetCompatibility = 1.7
27+
28+
def loadProperties() {
29+
// Config file with custom properties
30+
ext.configFile = file "build.properties"
31+
configFile.withReader {
32+
def prop = new Properties()
33+
prop.load(it)
34+
ext.config = new ConfigSlurper().parse prop
35+
}
36+
37+
// grab buildNumber
38+
ext.buildnumber = "DEV" // this will be referenced as simply project.buildnumber from now on.
39+
if (System.getenv().BUILD_NUMBER)
40+
project.buildnumber = System.getenv().BUILD_NUMBER
41+
if (System.getenv().CI)
42+
project.buildnumber += "-DEV"
43+
if (System.getenv().RELEASE)
44+
project.buildnumber = "RELEASE"
45+
logger.lifecycle "BUILDING VERSION: " + project.buildnumber
46+
}
47+
48+
apply from: 'gradle/forge.gradle'
49+
apply from: 'gradle/dev.gradle'
50+
apply from: 'gradle/deploy.gradle'
51+
52+
// Mark API directory as source directory in IDEA.
53+
idea {
54+
module {
55+
sourceDirs += file('src/api/java')
56+
}
57+
}

build.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mod_version=0.1.0
2+
minecraft_version=1.8
3+
forge_version=11.14.3.1446
4+
cyclopscore_version=0.1.0-DEV
5+

gradle/deploy.gradle

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apply plugin: "curseforge"
2+
apply plugin: 'maven'
3+
4+
if(project.hasProperty("curseforge_key") && project.hasProperty("changelog")) {
5+
curse {
6+
apiKey = project.curseforge_key
7+
projectId = "TODO" // my project url is http://minecraft.curseforge.com/mc-mods/TODO/
8+
changelog = new File(project.changelog).text
9+
releaseType = "release"
10+
11+
additionalArtifact deobfJar
12+
additionalArtifact apiJar
13+
additionalArtifact sourceJar
14+
additionalArtifact javadocJar
15+
}
16+
}
17+
18+
configurations {
19+
deployerJars
20+
}
21+
22+
dependencies {
23+
deployerJars "org.apache.maven.wagon:wagon-ftp:2.2"
24+
}
25+
26+
uploadArchives {
27+
repositories {
28+
add getProject().repositories.mavenLocal()
29+
}
30+
repositories.mavenDeployer {
31+
configuration = configurations.deployerJars
32+
33+
if (project.hasProperty("filesmaven_url")) {
34+
logger.info('Publishing to files server')
35+
repository(url: project.filesmaven_url) {
36+
authentication(userName: project.filesmaven_username, password: project.filesmaven_key)
37+
}
38+
} else {
39+
logger.info('Publishing to repo folder')
40+
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
41+
}
42+
43+
pom {
44+
groupId = project.group
45+
version = project.version
46+
artifactId = project.archivesBaseName
47+
}
48+
pom.project {
49+
name project.archivesBaseName
50+
packaging 'jar'
51+
description 'An evil mod for Minecraft'
52+
url 'https://github.com/rubensworks/EvilCraft'
53+
54+
scm {
55+
url 'https://github.com/rubensworks/EvilCraft'
56+
connection 'scm:git:git://github.com/rubensworks/EvilCraft.git'
57+
developerConnection 'scm:git:git@github.com:rubensworks/EvilCraft.git'
58+
}
59+
60+
issueManagement {
61+
system 'github'
62+
url 'https://github.com/rubensworks/EvilCraft/issues'
63+
}
64+
65+
developers {
66+
developer {
67+
id 'rubensworks'
68+
name 'rubensworks'
69+
roles { role 'developer' }
70+
}
71+
}
72+
}
73+
}
74+
}

gradle/dev.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
task deobfJar(type: Jar) {
2+
from sourceSets.main.output
3+
classifier = 'deobf'
4+
}
5+
6+
task sourceJar(type: Jar, dependsOn: "sourceMainJava") {
7+
from "build/sources/java"
8+
classifier = 'sources'
9+
}
10+
11+
task javadocJar(type: Jar, dependsOn: javadoc) {
12+
from 'build/docs/javadoc'
13+
classifier 'javadoc'
14+
}
15+
16+
artifacts {
17+
archives deobfJar
18+
archives sourceJar
19+
archives javadocJar
20+
}

gradle/forge.gradle

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
repositories {
2+
mavenLocal()
3+
mavenCentral()
4+
}
5+
6+
dependencies {
7+
compile "org.cyclops.cyclopscore:CyclopsCore:${config.minecraft_version}-${config.cyclopscore_version}:deobf"
8+
9+
// Project lombok
10+
compile "org.projectlombok:lombok:1.14.4"
11+
testCompile "junit:junit:4.12"
12+
}
13+
14+
minecraft {
15+
version = "${config.minecraft_version}-${config.forge_version}"
16+
17+
replaceIn "Reference.java"
18+
replace "@VERSION@", project.version
19+
replace "@MC_VERSION@", project.config.minecraft_version
20+
replace "@FORGE_VERSION@", project.config.forge_version
21+
replace "@BUILD_NUMBER@", project.buildnumber
22+
replace "@CYCLOPSCORE_VERSION@", project.config.cyclopscore_version
23+
24+
// the mappings can be changed at any time, and must be in the following format.
25+
// snapshot_YYYYMMDD snapshot are built nightly.
26+
// stable_# stables are built at the discretion of the MCP team.
27+
// Use non-default mappings at your own risk. they may not allways work.
28+
// simply re-run your setup task after changing the mappings to update your workspace.
29+
mappings = "snapshot_20150401"
30+
}
31+
32+
if (System.getenv().RELEASE)
33+
version = "${config.minecraft_version}-${config.mod_version}"
34+
else
35+
version = "${config.minecraft_version}-${config.mod_version}-${buildnumber}"
36+
37+
processResources {
38+
// replace stuff in mcmod.info, nothing else
39+
from(sourceSets.main.resources.srcDirs) {
40+
include 'mcmod.info'
41+
42+
// replace version and mcversion
43+
expand 'version':project.version, 'mcversion':project.minecraft.version
44+
}
45+
46+
// copy everything else, that is not the mcmod.info
47+
from(sourceSets.main.resources.srcDirs) {
48+
exclude 'mcmod.info'
49+
}
50+
}

gradle/wrapper/gradle-wrapper.jar

49.9 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sat Nov 08 17:22:53 CET 2014
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip

0 commit comments

Comments
 (0)