2015-06-22 17:35:23 +08:00
|
|
|
/*
|
2015-12-10 20:34:02 +08:00
|
|
|
* Hello Minecraft! Launcher.
|
|
|
|
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
2015-06-22 17:35:23 +08:00
|
|
|
*
|
2015-12-10 20:34:02 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2015-06-22 17:35:23 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2015-12-10 20:34:02 +08:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2015-06-22 17:35:23 +08:00
|
|
|
* (at your option) any later version.
|
2015-12-10 20:34:02 +08:00
|
|
|
*
|
2015-06-22 17:35:23 +08:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2015-12-10 20:34:02 +08:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2015-06-22 17:35:23 +08:00
|
|
|
* GNU General Public License for more details.
|
2015-12-10 20:34:02 +08:00
|
|
|
*
|
2015-06-22 17:35:23 +08:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2015-12-10 20:34:02 +08:00
|
|
|
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
2015-06-22 17:35:23 +08:00
|
|
|
*/
|
2015-06-22 16:47:05 +08:00
|
|
|
apply plugin: 'launch4j'
|
2015-08-04 15:13:04 +08:00
|
|
|
apply plugin: 'me.tatarka.retrolambda'
|
2015-06-22 16:47:05 +08:00
|
|
|
|
|
|
|
if (!hasProperty('mainClass')) {
|
|
|
|
ext.mainClass = 'org.jackhuang.hellominecraft.svrmgr.Main'
|
|
|
|
}
|
|
|
|
|
2016-02-27 14:14:23 +08:00
|
|
|
def buildnumber = System.getenv("TRAVIS_BUILD_NUMBER")
|
|
|
|
if (buildnumber == null)
|
|
|
|
buildnumber = System.getenv("BUILD_NUMBER")
|
|
|
|
if (buildnumber == null)
|
|
|
|
buildnumber = "233"
|
|
|
|
|
|
|
|
def versionroot = System.getenv("VERSION_ROOT")
|
|
|
|
if (versionroot == null)
|
2016-03-05 13:23:16 +08:00
|
|
|
versionroot = "0.8.7"
|
2015-08-04 15:13:04 +08:00
|
|
|
|
2015-06-22 16:47:05 +08:00
|
|
|
String mavenGroupId = 'HMCSM'
|
2016-02-27 14:14:23 +08:00
|
|
|
String mavenVersion = versionroot + '.' + buildnumber
|
2015-06-22 16:47:05 +08:00
|
|
|
String bundleName = "Hello Minecraft! Server Manager"
|
|
|
|
|
|
|
|
group = mavenGroupId
|
|
|
|
version = mavenVersion
|
|
|
|
|
|
|
|
String mavenArtifactId = name
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral();
|
|
|
|
dependencies {
|
|
|
|
classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
|
2015-08-04 15:13:04 +08:00
|
|
|
classpath 'me.tatarka:gradle-retrolambda:3.1.0'
|
2015-06-22 16:47:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(install.repositories.mavenInstaller) {
|
|
|
|
pom.project {
|
|
|
|
groupId = mavenGroupId
|
|
|
|
artifactId = mavenArtifactId
|
|
|
|
version = mavenVersion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-04 15:13:04 +08:00
|
|
|
retrolambda {
|
2015-08-13 20:54:42 +08:00
|
|
|
javaVersion = JavaVersion.VERSION_1_6
|
2015-08-04 15:13:04 +08:00
|
|
|
}
|
|
|
|
|
2015-06-22 16:47:05 +08:00
|
|
|
dependencies {
|
|
|
|
compile project(":HMCLAPI")
|
|
|
|
compile project(":MetroLookAndFeel")
|
2015-06-24 13:45:00 +08:00
|
|
|
compile ('org.jyaml:jyaml:1.3')
|
2015-06-22 16:47:05 +08:00
|
|
|
compile ("org.tukaani:xz:1.5")
|
|
|
|
compile ('org.jsoup:jsoup:1.7.2')
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes 'Created-By' : 'Copyright(c) 2014 huangyuhui.',
|
|
|
|
'Main-Class' : mainClass
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'icon.icns'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-10 20:34:02 +08:00
|
|
|
build.dependsOn makeExecutable
|