Files
MidnightControls/build.gradle
2021-03-15 17:20:16 +01:00

58 lines
1.3 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'org.cadixdev.licenser' version '0.5.0'
}
allprojects {
apply plugin: 'java-library'
group = project.maven_group
version = project.mod_version
// This field defines the Java version your mod target.
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too.
def targetJavaVersion = 8
repositories {
mavenLocal()
mavenCentral()
maven { url = 'https://aperlambda.github.io/maven' }
}
dependencies {
}
java {
sourceCompatibility = JavaVersion.toVersion(targetJavaVersion)
targetCompatibility = JavaVersion.toVersion(targetJavaVersion)
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetJavaVersion
}
}
}
publishing {
repositories {
mavenLocal()
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/LambdAurora/LambdaControls")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
}
}