mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-27 05:51:10 +03:00
Publish flightdecoder API to maven repo
This commit is contained in:
parent
76b017901b
commit
80692e3821
@ -1,6 +1,7 @@
|
||||
apply plugin: 'java'
|
||||
|
||||
group = 'org.rehlds.flightrec'
|
||||
version = rootProject.version
|
||||
|
||||
sourceCompatibility = '1.7'
|
||||
targetCompatibility = '1.7'
|
||||
|
@ -2,6 +2,7 @@ apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
group = 'org.rehlds.flightrec'
|
||||
version = rootProject.version
|
||||
|
||||
sourceCompatibility = '1.7'
|
||||
targetCompatibility = '1.7'
|
||||
@ -17,7 +18,7 @@ dependencies {
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
version rootProject.version
|
||||
version project.version
|
||||
artifactId 'decoder-api'
|
||||
artifact jar
|
||||
|
||||
@ -52,6 +53,22 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
if (project.version.contains('SNAPSHOT')) {
|
||||
url "http://nexus.rehlds.org/nexus/content/repositories/rehlds-snapshots/"
|
||||
} else {
|
||||
url "http://nexus.rehlds.org/nexus/content/repositories/rehlds-releases/"
|
||||
}
|
||||
credentials {
|
||||
username rootProject.repoCreds.getProperty('username')
|
||||
password rootProject.repoCreds.getProperty('password')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(AbstractCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ publishing {
|
||||
}
|
||||
|
||||
Properties repoCreds = new Properties()
|
||||
project.ext.repoCreds = repoCreds
|
||||
if (file('repo_creds.properties').exists()) {
|
||||
println 'Loading maven repo credentials'
|
||||
file('repo_creds.properties').withReader('UTF-8', { Reader r ->
|
||||
@ -147,5 +148,6 @@ task doPublish {
|
||||
dependsOn 'publishPackage'
|
||||
if (repoCreds.getProperty('username') && repoCreds.getProperty('password')) {
|
||||
dependsOn 'publish'
|
||||
dependsOn ':flightrec/decoder_api:publish'
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user