Plex/build.gradle

73 lines
1.8 KiB
Groovy

plugins {
id "java"
id "maven-publish"
id "com.github.johnrengelman.shadow" version "7.1.2"
}
group = "dev.plex"
version = "1.1-SNAPSHOT"
description = "Plex"
subprojects {
apply plugin: "java"
apply plugin: "maven-publish"
apply plugin: "com.github.johnrengelman.shadow"
repositories {
maven {
url = uri("https://papermc.io/repo/repository/maven-public/")
}
maven {
url = uri("https://repository.apache.org/content/repositories/snapshots/")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
maven {
url = uri("https://jitpack.io")
content {
includeGroup("com.github.MilkBowl")
}
}
mavenCentral()
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
publishing {
repositories {
maven {
def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
url = rootProject.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv("plexUser")
password = System.getenv("plexPassword")
}
}
}
}
}
clean {
dependsOn(":api:clean")
dependsOn(":server:clean")
//dependsOn(":proxy:clean")
}
task copyJars(type: Copy, dependsOn: subprojects.jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(subprojects.jar)
from(subprojects.shadowJar)
into project.file('build/libs')
}