mirror of
https://github.com/google/nomulus.git
synced 2025-08-03 16:32:11 +02:00
Add Spotless to the Gradle build (#88)
* Add Spotless to the Gradle build * spotless apply * one dot instead of two
This commit is contained in:
parent
ac82a5e4f1
commit
29d7cf7b9a
7 changed files with 35 additions and 32 deletions
|
@ -8,14 +8,13 @@ buildscript {
|
|||
}
|
||||
|
||||
plugins {
|
||||
// Java static analysis plugins. Keep versions consistent with ../build.gradle
|
||||
// Java static analysis plugins. Keep versions consistent with ../build.gradle
|
||||
id 'nebula.lint' version '10.4.2'
|
||||
// Config helper for annotation processors such as AutoValue and Dagger.
|
||||
// Ensures that source code is generated at an appropriate location.
|
||||
id 'net.ltgt.apt' version '0.19' apply false
|
||||
id 'net.ltgt.errorprone' version '0.6.1'
|
||||
id 'checkstyle'
|
||||
|
||||
id 'com.diffplug.gradle.spotless' version '3.18.0'
|
||||
}
|
||||
|
||||
|
@ -53,26 +52,6 @@ checkstyle {
|
|||
configDir file('../config/checkstyle')
|
||||
}
|
||||
|
||||
// To check or fix file formats, run the following commands from this directory:
|
||||
// - Check: ../gradlew spotlessCheck
|
||||
// - Format in place: ../gradlew spotlessApply
|
||||
spotless {
|
||||
java {
|
||||
target project.fileTree("${project.rootDir}/") {
|
||||
include "src/main/java/**/*.java"
|
||||
include "src/test/java/**/*.java"
|
||||
}
|
||||
googleJavaFormat('1.7')
|
||||
}
|
||||
format 'misc', {
|
||||
target '**/*.gradle'
|
||||
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces(2)
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def deps = dependencyMap
|
||||
compile deps['com.google.auth:google-auth-library-credentials']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue