ZNPCsPlus/api/build.gradle

34 lines
1.1 KiB
Groovy
Raw Normal View History

2023-04-26 23:58:09 +00:00
plugins {
id "java"
2023-04-26 23:58:09 +00:00
id "maven-publish"
}
dependencies {
compileOnly "org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = "znpcsplus-api"
2023-04-26 23:58:09 +00:00
pom {
name.set("znpcsplus-api")
description.set("The API for the ZNPCsPlus plugin")
2023-04-26 23:58:09 +00:00
url.set("https://github.com/Pyrbu/ZNPCsPlus")
}
}
}
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")
2023-04-26 23:58:09 +00:00
}
// 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/")
2023-04-26 23:58:09 +00:00
}
}
}