Skip to content

Commit

Permalink
Better way to depend on spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl committed Mar 9, 2023
1 parent aab7e2a commit 6e37b86
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions annotation-file-utilities/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import org.gradle.internal.jvm.Jvm
import java.nio.file.Files

buildscript {
dependencies {
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
// Code formatting; defines targets "spotlessApply" and "spotlessCheck".
// https://github.com/diffplug/spotless/tags ; see tags starting "gradle/"
// Only works on JDK 11+.
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.16.0'
}
}
}

plugins {
// https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
id 'com.github.johnrengelman.shadow' version '8.1.0'
Expand All @@ -10,11 +21,8 @@ plugins {

// To show task list as a tree, run: ./gradlew <taskname> taskTree
id 'com.dorongold.task-tree' version '2.1.1'

// Code formatting; defines targets "spotlessApply" and "spotlessCheck"
// Requires Java 11
id 'com.diffplug.spotless' version '6.14.0' apply false
}

apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'

Expand Down

0 comments on commit 6e37b86

Please sign in to comment.