diff --git a/.travis.yml b/.travis.yml index d413e5b6..a801cbde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,16 @@ language: java -install: true jdk: - - openjdk8 -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ + - openjdk8 + +jobs: + include: + - stage: check + script: ./gradlew check + - stage: publish + script: ./gradlew build publish + +stages: + - name: check + if: type IN (pull_request) + - name: publish + if: NOT type IN (pull_request) \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2d388b97..1351c38a 100644 --- a/build.gradle +++ b/build.gradle @@ -171,3 +171,56 @@ reobf { shadowJar{} } + +publishing { + publications { + maven(MavenPublication) { + afterEvaluate { + artifact(remapJar) + } + artifact(sourcesJar) { + builtBy remapSourcesJar + } + + pom { + name = "MineLittlePony" + description = "HD Skins support for Minecraft" + url = "https://minelittlepony-mod.com" + licenses { + license { + name = "MIT Public License" + url = "https://tlo.mit.edu/learn-about-intellectual-property/software-and-open-source-licensing" + } + } + developers { + developer { + id = "killjoy1221" + name = "Matthew Messinger" + email = "mattmess1221@gmail.com" + } + developer { + id = "sollace" + } + } + scm { + connection = 'scm:git:git://github.com/MineLittlePony/MineLittlePony.git' + developerConnection = 'scm:git:ssh://github.com/MineLittlePony/MineLittlePony.git' + url = 'https://github.com/MineLittlePony/MineLittlePony' + } + } + } + } + + repositories { + maven { + name = "MineLittlePony" + def mvn = 's3://repo.minelittlepony-mod.com/maven' + url = release == 'SNAPSHOT' ? "$mvn/snapshot" : "$mvn/release" + + credentials(AwsCredentials) { + accessKey = System.env.ACCESS_KEY + secretKey = System.env.SECRET_KEY + } + } + } +}