Skip to content
Snippets Groups Projects
Commit 959f368e authored by Dennis Bonke's avatar Dennis Bonke
Browse files

Commited some changes, maven auto deploy.


Signed-off-by: default avatarDennisbonke <dennisb@kabelfoon.net>
parent 777dab8d
No related branches found
No related tags found
No related merge requests found
bin
eclipse
.classpath
.gradle
.idea
.project
.settings
*.iml
*.ipr
*.iws
...@@ -16,10 +16,12 @@ buildscript { ...@@ -16,10 +16,12 @@ buildscript {
} }
apply plugin: 'forge' apply plugin: 'forge'
apply plugin: 'maven'
apply plugin: 'maven-publish'
project.ext.buildnumber = "CUSTOM_BUILD" // referenced as project.buildnumber project.ext.buildnumber = "CUSTOM_BUILD" // referenced as project.buildnumber
if (System.getenv().BUILD_NUMBER) // assuming jenkins ofcourse /*if (System.getenv().BUILD_NUMBER) // assuming jenkins ofcourse
{ {
project.buildnumber = System.getenv().BUILD_NUMBER project.buildnumber = System.getenv().BUILD_NUMBER
println "Using build number ${project.buildnumber}..." println "Using build number ${project.buildnumber}..."
...@@ -28,15 +30,70 @@ else ...@@ -28,15 +30,70 @@ else
{ {
project.buildnumber = "0" project.buildnumber = "0"
println "!! No build number set !!" println "!! No build number set !!"
} }*/
project.buildnumber = "1"
version = "1.7.10-0.2.2-B1" + "-" + project.buildnumber version = "1.7.10-0.2.2-B1" + "-" + project.buildnumber
group= "com.advancedmods.amcore" // http://maven.apache.org/guides/mini/guide-naming-conventions.html group= "com.advancedmods" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "AMCore" archivesBaseName = "AMCore"
// External properties
ext.configFile = file "build.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
configurations {
deployerJars
}
task buildInfo {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
proc.waitFor()
if (proc.exitValue() == 0) {
ext.revision = proc.text.trim()
} else {
ext.revision = "GITBORK"
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = "build${System.getenv().BUILD_NUMBER}"
} else {
ext.buildNum = "DEV.${project.buildInfo.revision}"
}
}
/*if (System.getenv().ARTIFACT_VERSION == null) {
artifact_version = "${config.mod_version}.${project.buildInfo.buildNum}"
}
if (System.getenv().ARTIFACT_VERSION != null) {
artifact_version = "${system.getenv().ARTIFACT_VERSION}"
}
version = "${config.minecraft_version}-${artifact_version}"*/
minecraft { minecraft {
version = "1.7.10-10.13.4.1614-1.7.10" // version = "1.7.10-10.13.4.1614-1.7.10"
version = config.minecraft_version + "-" + config.forge_version
runDir = "eclipse" runDir = "eclipse"
// replace '${version}', project.version
}
dependencies {
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "sftp://web1.zsnode.com/srv/users/maven/apps/maven-repo-public/public") {
authentication(userName: "maven", password: project.maven_pass)
}
}
} }
dependencies { dependencies {
...@@ -102,6 +159,32 @@ artifacts { ...@@ -102,6 +159,32 @@ artifacts {
archives javadocJar archives javadocJar
} }
/*task("uploadJars", dependsOn:"build") {
description = "uploads JARs"
if (project.hasProperty("local_maven") || project.hasProperty("sftp_maven")) {
apply plugin: 'maven'
uploadArchives {
repositories {
if(project.hasProperty("local_maven"))
{
mavenDeployer {
repository(url: "file://${local_maven}")
}
}
if(project.hasProperty("sftp_maven")) {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "sftp://${sftp_maven}"){
authentication(userName: "${sftp_username}",privateKey: "${sftp_key}")}
}
}
}
}
}
}*/
//apply plugin: 'curseforge' //apply plugin: 'curseforge'
//curse { //curse {
// apiKey = project.curseforge_key // gradle curse -Pcurseforge_key=your-api-key // apiKey = project.curseforge_key // gradle curse -Pcurseforge_key=your-api-key
......
minecraft_version=1.7.10
forge_version=10.13.4.1614-1.7.10
buildNum=0
...@@ -37,10 +37,14 @@ public class AMCore extends BaseMod { ...@@ -37,10 +37,14 @@ public class AMCore extends BaseMod {
@SidedProxy(clientSide = AMCoreProps.clientproxy, serverSide = AMCoreProps.commonproxy) @SidedProxy(clientSide = AMCoreProps.clientproxy, serverSide = AMCoreProps.commonproxy)
public static CommonProxy proxy; public static CommonProxy proxy;
public static Logger log = LogManager.getLogger("AMCore"); public static Logger log = LogManager.getLogger("AMCore");
public static final String issueURL = "https://github.com/AdvancedMods/AMCore/issues"; //public static final String issueURL = "https://github.com/AdvancedMods/AMCore/issues";
public static final String updateURL = "https://raw.github.com/AdvancedMods/AMCore/master/VERSION"; //public static final String updateURL = "https://raw.github.com/AdvancedMods/AMCore/master/VERSION";
//public static final String downloadURL = "http://ci.zsinfo.nl/job/AMCore/lastSuccessfulBuild/"; //public static final String downloadURL = "http://ci.zsinfo.nl/job/AMCore/lastSuccessfulBuild/";
public static final String downloadURL = "https://github.com/AdvancedMods/AMCore/releases"; public static final String issueURL = "http://git.zsinfo.nl/advanced-mods/AMCore/issues";
// TODO: Look at these addresses and update if appropriate!
public static final String updateURL = "http://git.zsinfo.nl/advanced-mods/AMCore";
public static final String downloadURL = "http://git.zsinfo.nl/advanced-mods/AMCore";
//public static final String downloadURL = "https://github.com/AdvancedMods/AMCore/releases";
public static ConfigurationHandler config; public static ConfigurationHandler config;
@EventHandler @EventHandler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment