Advanced-Portals/build.gradle

82 lines
2.2 KiB
Groovy

allprojects {
apply plugin: 'java'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
if (project.name != "advanced-portals") {
task buildSubmodules doLast {
task -> println "Building $task.project.name"
}
buildSubmodules.finalizedBy build
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
mavenCentral()
mavenLocal()
}
dependencies {
classpath "org.apache.httpcomponents:httpmime:4.5.13"
classpath "com.google.code.gson:gson:2.8.6"
classpath "org.apache.httpcomponents:httpclient:4.5.13"
}
}
apply from: 'env-variables.gradle'
archivesBaseName = "Advanced-Portals"
group = 'com.sekwah.advancedportals'
def versionString = (file('./version.txt').text + (isRelease ? "" : "-${snapshotName}${shaRef}")).replaceAll('\n', '')
setVersion(versionString)
println "Version: ${getVersion()}"
description = ""
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
// configuration that holds jars to copy into lib
implementation.extendsFrom(includeLibs)
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://nexus.velocitypowered.com/repository/maven-public/" }
}
// includeLibs just says to include the library in the final jar
dependencies {
includeLibs project(':lang')
includeLibs project(':core')
includeLibs project(':bungee')
includeLibs project(':spigot')
includeLibs project(':velocity')
}
apply from: 'env-variables.gradle'
println "Branch ${ext.branch}${ext.shaRef} isRelease: '${ext.isRelease}'"
jar {
// Filters the files out that are in the build folders. Look to see if there is a better way to do this?
from configurations.includeLibs.filter {
it.path.contains("${File.separator}build${File.separator}libs")
} .collect {
println("Will Include: ${it.name}")
it.isDirectory() ? it : zipTree(it)
}
}