Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/

// Plugins for configuring _this build_ of the module
plugins {
id 'groovy'
id 'com.diffplug.gradle.spotless' version "3.6.0"
}

// Dependencies on other plugins used when this plugin
// is invoked
repositories { jcenter() }

dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
}

// Because buildSrc is built and tested automatically _before_ gradle
// does anything else, it is not possible to spotlessApply because
// spotlessCheck fails before that. So this hack allows disabling
// the check for the moment of application.
//
// ./gradlew :buildSrc:spotlessApply -PdisableSpotlessCheck=true
def disableSpotlessCheck = project.hasProperty('disableSpotlessCheck') &&
project.disableSpotlessCheck == 'true'

spotless {
enforceCheck !disableSpotlessCheck
groovy {
excludeJava()
greclipse().configFile('greclipse.properties')
}
groovyGradle {
greclipse().configFile('greclipse.properties')
}
}
21 changes: 21 additions & 0 deletions buildSrc/greclipse.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
################################################################################
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
org.eclipse.jdt.core.formatter.indent_empty_lines=false
groovy.formatter.multiline.indentation=4
Loading