Update buildscripts to support publishing to Maven
This commit is contained in:
parent
17c89ba682
commit
c85a333de9
46
build.gradle
46
build.gradle
@ -1,11 +1,47 @@
|
|||||||
group 'eu.mivrenik'
|
group 'eu.mivrenik'
|
||||||
version '1.0'
|
version '1.0'
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'java-library'
|
|
||||||
|
|
||||||
sourceCompatibility = 1.7
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def creds = new Properties()
|
||||||
|
def credsFile = file("credentials.properties")
|
||||||
|
if (credsFile.exists())
|
||||||
|
credsFile.withInputStream { creds.load(it) }
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.7
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "funqx gitea"
|
||||||
|
url = uri("https://git.funqx.org/api/packages/World2Join/maven")
|
||||||
|
|
||||||
|
credentials(HttpHeaderCredentials) {
|
||||||
|
name = "Authorization"
|
||||||
|
value = "token ${creds.getProperty("gitea.token")}"
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
header(HttpHeaderAuthentication)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user