Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
This contains the basic requirements for this coremod which are ported from EvilCraft into a Minecraft 1.8 compatible environment.
  • Loading branch information
rubensworks committed Apr 5, 2015
0 parents commit 74f21db
Show file tree
Hide file tree
Showing 70 changed files with 5,563 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# We don't want compiled stuff in here!
/bin
doc/info.txt
/build
/run

# Ignore project specific files
.classpath
.project
.settings
.pydevproject
eclipse/*
.gradle/*
repo/*
*.iml
*.ipr
*.iws
out/*

# Ignore mac-specific file(s)
.DS_Store

# Ignore files specific to dev environments
gradle.properties
build_number.properties
changelog.txt
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Cyclops

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 55 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}

apply plugin: 'forge'

loadProperties()

version = config.mod_version
group = "org.cyclops.cyclopscore"
archivesBaseName = "CyclopsCore"

def loadProperties() {
// Config file with custom properties
ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}

// grab buildNumber
ext.buildnumber = "DEV" // this will be referenced as simply project.buildnumber from now on.
if (System.getenv().BUILD_NUMBER)
project.buildnumber = System.getenv().BUILD_NUMBER
if (System.getenv().CI)
project.buildnumber += "-DEV"
if (System.getenv().RELEASE)
project.buildnumber = "RELEASE"
logger.lifecycle "BUILDING VERSION: " + project.buildnumber
}

apply from: 'gradle/forge.gradle'
apply from: 'gradle/dev.gradle'
apply from: 'gradle/deploy.gradle'

// Mark API directory as source directory in IDEA.
idea {
module {
sourceDirs += file('src/api/java')
}
}
4 changes: 4 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mod_version=0.1.0
minecraft_version=1.8
forge_version=11.14.1.1329

74 changes: 74 additions & 0 deletions gradle/deploy.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apply plugin: "curseforge"
apply plugin: 'maven'

if(project.hasProperty("curseforge_key") && project.hasProperty("changelog")) {
curse {
apiKey = project.curseforge_key
projectId = "TODO" // my project url is http://minecraft.curseforge.com/mc-mods/TODO/
changelog = new File(project.changelog).text
releaseType = "release"

additionalArtifact deobfJar
additionalArtifact apiJar
additionalArtifact sourceJar
additionalArtifact javadocJar
}
}

configurations {
deployerJars
}

dependencies {
deployerJars "org.apache.maven.wagon:wagon-ftp:2.2"
}

uploadArchives {
repositories {
add getProject().repositories.mavenLocal()
}
repositories.mavenDeployer {
configuration = configurations.deployerJars

if (project.hasProperty("filesmaven_url")) {
logger.info('Publishing to files server')
repository(url: project.filesmaven_url) {
authentication(userName: project.filesmaven_username, password: project.filesmaven_key)
}
} else {
logger.info('Publishing to repo folder')
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}

pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
}
pom.project {
name project.archivesBaseName
packaging 'jar'
description 'An evil mod for Minecraft'
url 'https://github.com/rubensworks/EvilCraft'

scm {
url 'https://github.com/rubensworks/EvilCraft'
connection 'scm:git:git://github.com/rubensworks/EvilCraft.git'
developerConnection 'scm:git:[email protected]:rubensworks/EvilCraft.git'
}

issueManagement {
system 'github'
url 'https://github.com/rubensworks/EvilCraft/issues'
}

developers {
developer {
id 'rubensworks'
name 'rubensworks'
roles { role 'developer' }
}
}
}
}
}
20 changes: 20 additions & 0 deletions gradle/dev.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}

task sourceJar(type: Jar, dependsOn: "sourceMainJava") {
from "build/sources/java"
classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
from 'build/docs/javadoc'
classifier 'javadoc'
}

artifacts {
archives deobfJar
archives sourceJar
archives javadocJar
}
38 changes: 38 additions & 0 deletions gradle/forge.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repositories {
mavenCentral()
}

dependencies {
// Project lombok
compile "org.projectlombok:lombok:1.14.4"
}

minecraft {
version = "${config.minecraft_version}-${config.forge_version}"

replaceIn "Reference.java"
replace "@VERSION@", project.version
replace "@MC_VERSION@", project.config.minecraft_version
replace "@FORGE_VERSION@", project.config.forge_version
replace "@BUILD_NUMBER@", project.buildnumber
}

if (System.getenv().RELEASE)
version = "${config.minecraft_version}-${config.mod_version}"
else
version = "${config.minecraft_version}-${config.mod_version}-${buildnumber}"

processResources {
// 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, that is not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sat Nov 08 17:22:53 CET 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip
Loading

0 comments on commit 74f21db

Please sign in to comment.