mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
deploy to travis
This commit is contained in:
parent
cc1bbbbd7b
commit
39b54cbc00
3 changed files with 88 additions and 54 deletions
15
.travis.yml
15
.travis.yml
|
@ -1,11 +1,8 @@
|
||||||
language: java
|
language: java
|
||||||
install: true
|
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk8
|
- openjdk8
|
||||||
before_cache:
|
deploy:
|
||||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
provider: script
|
||||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
script: ./gradlew build publish
|
||||||
cache:
|
on:
|
||||||
directories:
|
branch: master
|
||||||
- $HOME/.gradle/caches/
|
|
||||||
- $HOME/.gradle/wrapper/
|
|
||||||
|
|
121
build.gradle
121
build.gradle
|
@ -1,32 +1,17 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.2.2-SNAPSHOT'
|
id 'fabric-loom' version '0.2.4-SNAPSHOT'
|
||||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
id 'com.github.johnrengelman.plugin-shadow' version '2.0.3'
|
||||||
id 'com.github.johnrengelman.plugin-shadow' version '2.0.3'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
ext {
|
version = "${project.minecraft_version}-${project.version}"
|
||||||
if (grgit == null) {
|
|
||||||
revision = "nogit"
|
|
||||||
} else {
|
|
||||||
revision = "${grgit.log().size()}-${grgit.head().abbreviatedId}"
|
|
||||||
if (file('.git/shallow').exists()) {
|
|
||||||
// don't clone with --depth
|
|
||||||
revision = "-1-shallow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
version = "${project.minecraft_version}.${project.version}"
|
|
||||||
|
|
||||||
if (project.release != 'RELEASE') {
|
if (project.release != 'RELEASE') {
|
||||||
version += "-${project.release}"
|
version += "-${project.release}"
|
||||||
}
|
}
|
||||||
if (project.release == 'SNAPSHOT') {
|
|
||||||
version += "-${project.revision}"
|
|
||||||
}
|
|
||||||
|
|
||||||
group = project.group
|
group = project.group
|
||||||
description = project.displayname
|
description = project.displayname
|
||||||
|
@ -38,49 +23,48 @@ minecraft {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = 'Jit'
|
name = 'minelp'
|
||||||
url = 'https://jitpack.io'
|
url = 'http://repo.minelittlepony-mod.com/maven/snapshot'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
||||||
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
|
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
|
||||||
|
|
||||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
modCompile "com.github.MineLittlePony:Kirin:${project.kirin_version}"
|
modCompile "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||||
include "com.github.MineLittlePony:Kirin:${project.kirin_version}"
|
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||||
|
|
||||||
// TODO: HD Skins can be made optional later
|
// TODO: HD Skins can be made optional later
|
||||||
modCompile "com.github.MineLittlePony:HDSkins:${project.hd_skins_version}"
|
modCompile "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
||||||
include "com.github.MineLittlePony:HDSkins:${project.hd_skins_version}"
|
include "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
inputs.property "version", project.version
|
inputs.property "version", project.version
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include "fabric.mod.json"
|
include "fabric.mod.json"
|
||||||
expand "version": project.version
|
expand "version": project.version
|
||||||
}
|
}
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
exclude "fabric.mod.json"
|
exclude "fabric.mod.json"
|
||||||
}
|
}
|
||||||
from 'LICENSE'
|
from 'LICENSE'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = "sources"
|
classifier = "sources"
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -94,9 +78,62 @@ task copyBGPones(type: Copy) {
|
||||||
into temporaryDir
|
into temporaryDir
|
||||||
|
|
||||||
eachFile {
|
eachFile {
|
||||||
if (it.name =~ illegals){
|
if (it.name =~ illegals) {
|
||||||
logger.warn("Sanitizing file with illegal characters: ${it.path}")
|
logger.warn("Sanitizing file with illegal characters: ${it.path}")
|
||||||
it.name = it.name.replaceAll(/\s/, '_').replaceAll(illegals, '')
|
it.name = it.name.replaceAll(/\s/, '_').replaceAll(illegals, '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
afterEvaluate {
|
||||||
|
artifact(remapJar.output)
|
||||||
|
}
|
||||||
|
artifact(sourcesJar) {
|
||||||
|
builtBy remapSourcesJar
|
||||||
|
}
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name = "MineLittlePony"
|
||||||
|
description = "HD Skins support for Minecraft"
|
||||||
|
url = "http://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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,5 +18,5 @@ org.gradle.daemon=false
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.3.0+
|
fabric_version=0.3.0+
|
||||||
kirin_version=b69d6643c8
|
kirin_version=1.14.2-1.0.1-SNAPSHOT
|
||||||
hd_skins_version=b4327b9cf9
|
hd_skins_version=1.14.2-5.0.1-SNAPSHOT
|
||||||
|
|
Loading…
Reference in a new issue