This commit is contained in:
parent
2c35a089ec
commit
ae1dd25a9a
5 changed files with 50 additions and 13 deletions
18
.drone.yml
Normal file
18
.drone.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- custom
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish
|
||||||
|
pull: if-not-exists
|
||||||
|
image: openjdk:8-jdk
|
||||||
|
environment:
|
||||||
|
PACKAGESKEY:
|
||||||
|
from_secret: GITEA_PACKAGE_PUBLIC_RW
|
||||||
|
commands:
|
||||||
|
- ./gradlew --no-daemon --parallel -Pnetherite.git.packages.token=$PACKAGESKEY build publish
|
|
@ -1,6 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "maven-publish"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -21,15 +20,4 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
Map<String, String> systemProperties = System.getenv()
|
|
||||||
credentials {
|
|
||||||
if (systemProperties.containsKey("DIST_USERNAME")) username systemProperties.get("DIST_USERNAME")
|
|
||||||
if (systemProperties.containsKey("DIST_PASSWORD")) password systemProperties.get("DIST_PASSWORD")
|
|
||||||
}
|
|
||||||
// If the BUILD_ID enviroment variable is present that means its a Jenkins build & that it should go into the snapshots repo
|
|
||||||
url = systemProperties.containsKey("BUILD_ID") ? uri("https://repo.pyr.lol/snapshots/") : uri("https://repo.pyr.lol/releases/")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
18
build.gradle
18
build.gradle
|
@ -1,8 +1,9 @@
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
group "lol.pyr"
|
group "lol.pyr"
|
||||||
version "2.0.0" + (System.getenv().containsKey("BUILD_ID") ? "-SNAPSHOT" : "")
|
version "2.0.0-netherite-SNAPSHOT"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
|
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
|
||||||
|
@ -36,4 +37,19 @@ subprojects {
|
||||||
url "https://jitpack.io/"
|
url "https://jitpack.io/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("https://git.netherite.gg/api/packages/Netherite-Public/maven")
|
||||||
|
credentials(HttpHeaderCredentials) {
|
||||||
|
name "Authorization"
|
||||||
|
value "token ${project.properties["netherite.git.packages.token"]}"
|
||||||
|
}
|
||||||
|
authentication {
|
||||||
|
header(HttpHeaderAuthentication)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
|
@ -15,6 +15,21 @@ processResources {
|
||||||
expand("version": version)
|
expand("version": version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
artifactId = "znpcsplus-plugin"
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name.set("znpcsplus-plugin")
|
||||||
|
description.set("The ZNPCsPlus plugin")
|
||||||
|
url.set("https://github.com/Pyrbu/ZNPCsPlus")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly "me.clip:placeholderapi:2.11.3" // Placeholder support
|
compileOnly "me.clip:placeholderapi:2.11.3" // Placeholder support
|
||||||
compileOnly "com.google.code.gson:gson:2.10.1" // JSON parsing
|
compileOnly "com.google.code.gson:gson:2.10.1" // JSON parsing
|
||||||
|
|
Loading…
Reference in a new issue