1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Add support for Maven uploading

This commit is contained in:
SquidDev 2018-04-19 22:36:00 +01:00
parent e2f9ddd534
commit 83546d0acb

View File

@ -15,11 +15,13 @@ buildscript {
}
plugins {
id 'com.matthewprenger.cursegradle' version '1.0.9'
id 'com.matthewprenger.cursegradle' version '1.0.10'
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.ajoberstar.grgit'
apply plugin: 'maven-publish'
apply plugin: 'maven'
version = "1.80pr1.5"
group = "org.squiddev"
@ -53,6 +55,7 @@ repositories {
configurations {
shade
compile.extendsFrom shade
deployerJars
}
dependencies {
@ -61,6 +64,8 @@ dependencies {
shade 'org.squiddev:Cobalt:0.3.1'
testCompile 'junit:junit:4.11'
deployerJars "org.apache.maven.wagon:wagon-ssh:3.0.0"
}
javadoc {
@ -125,6 +130,30 @@ curseforge {
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
}
}
}
uploadArchives {
repositories {
if(project.hasProperty('mavenUploadUrl')) {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: project.property('mavenUploadUrl')) {
authentication(
userName: project.property('mavenUploadUser'),
privateKey: project.property('mavenUploadKey'))
}
}
}
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint"