Skip to content

Commit

Permalink
Added Spotless plugin to enforce formatting standards.
Browse files Browse the repository at this point in the history
Added Google Java Style guide formatter templates, removed existing formatter templates.

Ran './gradlew clean build' for verification

This closes apache#268
  • Loading branch information
jaredjstewart authored and Mark Bretl committed Oct 21, 2016
1 parent 56917a2 commit 8bf3957
Show file tree
Hide file tree
Showing 5,784 changed files with 549,311 additions and 553,787 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ buildscript {
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.0"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1'
classpath "com.diffplug.gradle.spotless:spotless:2.2.0"
}
}

Expand All @@ -45,7 +46,7 @@ allprojects {
// We want to see all test results. This is equivalatent to setting --continue
// on the command line.
gradle.startParameter.continueOnFailure = true

repositories {
mavenCentral()
maven { url "http://repo.spring.io/release" }
Expand All @@ -63,7 +64,7 @@ task cleanAll(type: Delete) {
delete rootProject.buildDir
if (!buildRoot.isEmpty()) {
delete buildRoot
}
}
}

// allow external projects to override include location
Expand All @@ -84,6 +85,13 @@ apply from: "${scriptDir}/rat.gradle"
subprojects {
// Make sure clean task for rootProject runs last
clean.finalizedBy rootProject.cleanAll

apply plugin: "com.diffplug.gradle.spotless"
spotless {
java {
eclipseFormatFile "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
}
}
}

task cleanExamples(type: GradleBuild) {
Expand Down
568 changes: 305 additions & 263 deletions etc/eclipseFormatterProfile.xml → etc/eclipse-java-google-style.xml
100755 → 100644

Large diffs are not rendered by default.

365 changes: 365 additions & 0 deletions etc/intellij-java-google-style.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 8bf3957

Please sign in to comment.