Add maven support
This commit is contained in:
parent
c33a336a73
commit
bdeb99d050
34
build.gradle
34
build.gradle
|
@ -1,10 +1,19 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
|
id 'maven-publish'
|
||||||
|
}
|
||||||
|
|
||||||
|
def getVersionName = { ->
|
||||||
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine 'git', 'describe', '--tags'
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
return stdout.toString().trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'ley'
|
group 'ley'
|
||||||
version '1.0-SNAPSHOT'
|
version getVersionName()
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -20,3 +29,24 @@ task sourcesJar(type: Jar) {
|
||||||
from sourceSets.main.allJava
|
from sourceSets.main.allJava
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
groupId = project.group
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
credentials {
|
||||||
|
username = "$usr"
|
||||||
|
password = "$pwd"
|
||||||
|
}
|
||||||
|
|
||||||
|
url = "http://git.tilera.xyz:8002/repository/maven-releases/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue