Skip to content

Commit

Permalink
Use Spotless for license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed May 17, 2023
1 parent 95e09e2 commit 7c9a6d2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
27 changes: 15 additions & 12 deletions HEADER
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Copyright (c) 2016, 2017, 2018, 2019 FabricMC
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'org.cadixdev.licenser'
id 'com.diffplug.spotless'
id 'com.github.johnrengelman.shadow'
id 'checkstyle'
}
Expand Down Expand Up @@ -47,9 +47,10 @@ dependencies {
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}"
}

license {
header project.file('HEADER')
include '**/*.java'
spotless {
java {
licenseHeaderFile(rootProject.file('HEADER'))
}
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.parallel = true
org.gradle.workers.max = 3

# Gradle Plugins
cadixdev_licenser_version = 0.6.1
spotless_version = 6.13.0
shadow_version = 7.1.2

# Project Properties
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
mavenCentral();
}
plugins {
id 'org.cadixdev.licenser' version "${cadixdev_licenser_version}"
id 'com.diffplug.spotless' version "${spotless_version}"
id 'com.github.johnrengelman.shadow' version "${shadow_version}"
}
}
Expand Down

0 comments on commit 7c9a6d2

Please sign in to comment.