mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-21 11:45:25 +01:00
Migrate to indra spotless licenser
This commit is contained in:
parent
ce3c1b3467
commit
88cb649171
@ -34,9 +34,9 @@ jar {
|
||||
from sourceSets.ap.output.resourcesDir
|
||||
}
|
||||
|
||||
license {
|
||||
indraSpotlessLicenser {
|
||||
// Overwrite the default
|
||||
header = rootProject.file('buildscript/license/API_LICENSE_HEADER')
|
||||
licenseHeaderFile(rootProject.file('buildscript/license/API_LICENSE_HEADER'))
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
27
build.gradle
27
build.gradle
@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
alias(libs.plugins.shadow) apply false
|
||||
alias(libs.plugins.licenser) apply false
|
||||
alias(libs.plugins.blossom) apply false
|
||||
alias(libs.plugins.indra.git) apply false
|
||||
alias(libs.plugins.indra.licenser) apply false
|
||||
alias(libs.plugins.dependencydownload.plugin) apply false
|
||||
alias(libs.plugins.idea.ext) apply false
|
||||
}
|
||||
@ -14,8 +14,8 @@ subprojects {
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'io.github.goooler.shadow'
|
||||
apply plugin: 'net.minecraftforge.licenser'
|
||||
apply plugin: 'net.kyori.indra.git'
|
||||
apply plugin: 'net.kyori.indra.licenser.spotless'
|
||||
apply plugin: 'dev.vankka.dependencydownload.plugin'
|
||||
|
||||
group 'com.discordsrv'
|
||||
@ -91,14 +91,16 @@ subprojects {
|
||||
|
||||
dependencies {
|
||||
// Test dependencies
|
||||
testImplementation(libs.jupiter.api)
|
||||
testRuntimeOnly(libs.jupiter.engine)
|
||||
testImplementation(libs.junit.jupiter)
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
|
||||
// DynamicProxy
|
||||
annotationProcessor(libs.dynamicproxy.api)
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
|
||||
testLogging {
|
||||
exceptionFormat = 'full'
|
||||
}
|
||||
@ -114,7 +116,7 @@ subprojects {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
|
||||
// If CI then check that licenses are correct, otherwise automatically apply licenses on build
|
||||
dependsOn (System.getenv('CI') === 'true' ? licenseCheck : licenseFormat)
|
||||
dependsOn (System.getenv('CI') === 'true' ? spotlessCheck : spotlessApply)
|
||||
// Always run shadowJar
|
||||
finalizedBy shadowJar
|
||||
|
||||
@ -170,15 +172,10 @@ subprojects {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
|
||||
license {
|
||||
header = rootProject.file('buildscript/license/LICENSE_HEADER')
|
||||
properties {
|
||||
var inception = '2016'
|
||||
var currentYear = String.valueOf(Calendar.getInstance().get(Calendar.YEAR))
|
||||
|
||||
year = inception == currentYear ? currentYear : inception + '-' + currentYear
|
||||
}
|
||||
include '**/*.java' // only java files
|
||||
indraSpotlessLicenser {
|
||||
licenseHeaderFile(rootProject.file('buildscript/license/LICENSE_HEADER'))
|
||||
newLine(true)
|
||||
property('inception', '2016')
|
||||
property('year_now', String.valueOf(Calendar.getInstance().get(Calendar.YEAR)))
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
This file is part of the DiscordSRV API, licensed under the MIT License
|
||||
Copyright (c) ${year} Austin "Scarsz" Shapiro, Henri "Vankka" Schubin and DiscordSRV contributors
|
||||
Copyright (c) $inception-$year_now Austin "Scarsz" Shapiro, Henri "Vankka" Schubin and DiscordSRV contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,5 +1,5 @@
|
||||
This file is part of DiscordSRV, licensed under the GPLv3 License
|
||||
Copyright (c) ${year} Austin "Scarsz" Shapiro, Henri "Vankka" Schubin and DiscordSRV contributors
|
||||
Copyright (c) $inception-$year_now Austin "Scarsz" Shapiro, Henri "Vankka" Schubin and DiscordSRV contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -11,9 +11,10 @@ dependencyResolutionManagement {
|
||||
libs {
|
||||
// Buildscript
|
||||
plugin('shadow', 'io.github.goooler.shadow').version('8.1.7')
|
||||
plugin('licenser', 'net.minecraftforge.licenser').version('1.0.1')
|
||||
plugin('spotless', 'com.diffplug.spotless').version('6.25.0')
|
||||
plugin('blossom', 'net.kyori.blossom').version('2.1.0')
|
||||
plugin('indra-git', 'net.kyori.indra.git').version('2.1.1')
|
||||
plugin('indra-git', 'net.kyori.indra.git').version('2.2.0')
|
||||
plugin('indra-licenser', 'net.kyori.indra.licenser.spotless').version('2.2.0')
|
||||
plugin('idea-ext', 'org.jetbrains.gradle.plugin.idea-ext').version('1.1.7')
|
||||
|
||||
// Bukkit
|
||||
@ -135,9 +136,7 @@ dependencyResolutionManagement {
|
||||
library('enhancedlegacytext', 'dev.vankka', 'enhancedlegacytext').version('2.0.0-SNAPSHOT')
|
||||
|
||||
// JUnit
|
||||
version('junit', '5.10.0')
|
||||
library('jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
|
||||
library('jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
|
||||
library('junit-jupiter', 'org.junit.jupiter', 'junit-jupiter').version('5.10.2')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user