Update build scripts for Gradle 7 (#247)
* fabric: Update Loom to 0.7-SNAPSHOT * Update to Gradle 7 Switch to CadixDev/licenser The plugin we were using before does not support Gradle 7, and hasn't been updated in over a year. * Remove `jcenter()` references * Move to new JDA repo and bump version * Use setup-java v2 and Adopt JDK 16 in gh actions * build: Temporarily add Incendo repo for plugin resolution Allows building until licenser has a new release * Import indra plugin classes instead of string applies * remove space Co-authored-by: broccolai <me@broccol.ai>
This commit is contained in:
parent
09fac7734e
commit
c9ac39ed26
132 changed files with 32 additions and 167 deletions
|
|
@ -1,19 +1,24 @@
|
|||
import com.hierynomus.gradle.license.LicenseBasePlugin
|
||||
import com.hierynomus.gradle.license.tasks.LicenseCheck
|
||||
import de.marcphilipp.gradle.nexus.NexusPublishExtension
|
||||
import net.kyori.indra.IndraLicenseHeaderPlugin
|
||||
import net.kyori.indra.IndraCheckstylePlugin
|
||||
import net.kyori.indra.IndraExtension
|
||||
import net.kyori.indra.IndraPlugin
|
||||
import net.kyori.indra.sonatype.IndraSonatypePublishingPlugin
|
||||
import net.kyori.indra.sonatypeSnapshots
|
||||
import net.ltgt.gradle.errorprone.ErrorPronePlugin
|
||||
import net.ltgt.gradle.errorprone.errorprone
|
||||
import nl.javadude.gradle.plugins.license.LicenseExtension
|
||||
import org.gradle.api.plugins.JavaPlugin.*
|
||||
import org.cadixdev.gradle.licenser.LicenseExtension
|
||||
import org.cadixdev.gradle.licenser.header.HeaderStyle
|
||||
import org.gradle.api.plugins.JavaPlugin.COMPILE_ONLY_API_CONFIGURATION_NAME
|
||||
import org.gradle.api.plugins.JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME
|
||||
|
||||
plugins {
|
||||
val indraVersion = "1.2.1"
|
||||
val indraVersion = "1.3.1"
|
||||
id("net.kyori.indra") version indraVersion apply false
|
||||
id("net.kyori.indra.checkstyle") version indraVersion apply false
|
||||
id("net.kyori.indra.publishing.sonatype") version indraVersion apply false
|
||||
id("com.github.hierynomus.license") version "0.15.0" apply false
|
||||
id("net.kyori.indra.license-header") version indraVersion apply false
|
||||
id("org.cadixdev.licenser") version "0.6.0-SNAPSHOT" apply false
|
||||
id("com.github.johnrengelman.shadow") version "6.1.0" apply false
|
||||
id("net.ltgt.errorprone") version "1.3.0" apply false
|
||||
id("com.github.ben-manes.versions") version "0.38.0"
|
||||
|
|
@ -36,18 +41,11 @@ version = "1.5.0-SNAPSHOT"
|
|||
description = "Command framework and dispatcher for the JVM"
|
||||
|
||||
subprojects {
|
||||
plugins.apply("net.kyori.indra")
|
||||
plugins.apply("net.kyori.indra.checkstyle")
|
||||
plugins.apply("net.kyori.indra.publishing.sonatype")
|
||||
apply<IndraPlugin>()
|
||||
apply<IndraCheckstylePlugin>()
|
||||
apply<IndraSonatypePublishingPlugin>()
|
||||
apply<IndraLicenseHeaderPlugin>()
|
||||
apply<ErrorPronePlugin>()
|
||||
apply<LicenseBasePlugin>()
|
||||
|
||||
extensions.configure(LicenseExtension::class) {
|
||||
header = rootProject.file("HEADER")
|
||||
mapping("java", "DOUBLESLASH_STYLE")
|
||||
mapping("kt", "DOUBLESLASH_STYLE")
|
||||
includes(listOf("**/*.java", "**/*.kt"))
|
||||
}
|
||||
|
||||
extensions.configure(IndraExtension::class) {
|
||||
github("Incendo", "cloud") {
|
||||
|
|
@ -100,16 +98,17 @@ subprojects {
|
|||
}
|
||||
options.compilerArgs.addAll(listOf("-Xlint:-processing", "-Werror"))
|
||||
}
|
||||
}
|
||||
|
||||
named("check") {
|
||||
dependsOn(withType(LicenseCheck::class))
|
||||
}
|
||||
extensions.configure<LicenseExtension> {
|
||||
header = rootProject.file("HEADER")
|
||||
style["java"] = HeaderStyle.DOUBLE_SLASH.format
|
||||
style["kt"] = HeaderStyle.DOUBLE_SLASH.format
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
sonatypeSnapshots()
|
||||
jcenter()
|
||||
/* Velocity, used for cloud-velocity */
|
||||
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-release/") {
|
||||
mavenContent { releasesOnly() }
|
||||
|
|
@ -134,6 +133,8 @@ subprojects {
|
|||
maven("https://jitpack.io") {
|
||||
content { includeGroupByRegex("com\\.github\\..*") }
|
||||
}
|
||||
/* JDA's maven repository for cloud-jda */
|
||||
maven("https://m2.dv8tion.net/releases")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue