Commit aafb8373 authored by Aaron Coburn's avatar Aaron Coburn
Browse files

Bring buildtools into project

Related to !28
parent 2d8cb9d9
......@@ -29,6 +29,7 @@ allprojects {
ext {
jacocoVersion = '0.8.2'
checkstyleVersion = '8.12'
}
gradle.projectsEvaluated {
......@@ -128,8 +129,9 @@ subprojects { subproj ->
}
checkstyle {
configFile = rootProject.file('build/checkstyle/checkstyle.xml')
configProperties.checkstyleConfigDir = rootProject.file('build/checkstyle/')
configFile = rootProject.file('buildtools/src/main/resources/checkstyle/checkstyle.xml')
configProperties.checkstyleConfigDir = rootProject.file('buildtools/src/main/resources/checkstyle/')
toolVersion = checkstyleVersion
}
jacoco {
......@@ -145,7 +147,7 @@ subprojects { subproj ->
license {
include "**/*.java"
header rootProject.file('build/license/HEADER.txt')
header rootProject.file('buildtools/src/main/resources/license/HEADER.txt')
strictCheck true
mapping {
java = 'SLASHSTAR_STYLE'
......@@ -254,15 +256,6 @@ subprojects { subproj ->
}
}
configurations {
buildToolsConfig
}
dependencies {
buildToolsConfig "edu.amherst.acdc:acrepo-build-tools:0.1.0"
}
// Ignore alpha, beta, milestone and release candidates
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
......@@ -277,18 +270,6 @@ dependencyUpdates.resolutionStrategy = {
}
}
task processBuildTools(type: Copy) {
from {
configurations.buildToolsConfig.collect {
zipTree(it).matching {
include 'checkstyle/*.xml'
include 'license/*.txt'
}
}
}
into 'build'
}
task docs(type: Javadoc) {
outputs.upToDateWhen { false }
source subprojects.collect {project -> project.sourceSets.main.allJava }
......@@ -302,7 +283,6 @@ task docs(type: Javadoc) {
}
}
check.dependsOn processBuildTools
afterReleaseBuild.dependsOn docs
afterReleaseBuild.dependsOn publish
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!-- Suppress -->
<module name="SuppressionFilter">
<property name="file" value="${checkstyleConfigDir}/suppressions.xml"/>
</module>
<!-- Checks that there are no tab characters ('\t') in the source code. -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<property name="fileExtensions" value="java,css,js,xml"/>
</module>
<!-- License Header module disabled in favor of license-maven-plugin -->
<module name="TreeWalker">
<!-- Checks for redundant import statements -->
<module name="RedundantImport"/>
<!-- Checks for unused import statements -->
<module name="UnusedImports"/>
<!-- Check that finds import statements that use the * notation. -->
<module name="AvoidStarImport"/>
<!-- Checks for long lines. -->
<module name="LineLength">
<property name="max" value="120"/>
</module>
<!-- Write Javadocs for public methods and classes. Keep it short and to the point
/**
* @author Joe Developer
* @date MMM DD, YYYY
*/
public class MyClass
-->
<module name="JavadocType">
<property name="scope" value="public"/>
<property name="excludeScope" value="anoninner"/>
<!-- Contrary to expectation only checks for author tags without an author -->
<property name="authorFormat" value="\S"/>
<property name="allowUnknownTags" value="true"/>
<property name="allowMissingParamTags" value="false"/>
</module>
<!-- Ensure files have the Javadoc @author tag -->
<module name="Regexp">
<property name="format" value=" \* \@author "/>
<property name="message" value="Javadoc @author tag"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>
<!-- K&R style braces -->
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"
/>
</module>
<module name="Indentation">
<property name="throwsIndent" value="8"/>
</module>
<module name="SuppressWarningsHolder"/>
<module name="FinalLocalVariable"/>
<module name="FinalParameters"/>
<module name="GenericWhitespace"/>
<module name="HideUtilityClassConstructor"/>
<module name="MultipleVariableDeclarations"/>
</module>
<!-- No Trailing Whitespace, except on lines that only have an asterisk (e.g. Javadoc comments) -->
<module name="RegexpSingleline">
<property name="format" value="(?&lt;!\*)\s+$|\*\s\s+$"/>
<property name="message" value="Trailing whitespace"/>
<property name="fileExtensions" value="java,css,js,xml"/>
</module>
<module name="SuppressWarningsFilter" />
</module>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress checks="JavadocMethod" files="src[/\\]test[/\\]java"/>
<suppress checks="JavadocPackage" files="src[/\\]test[/\\]java"/>
<suppress checks="JavadocVariable" files="src[/\\]test[/\\]java"/>
<suppress checks="JavadocType" files="src[/\\]test[/\\]java"/>
<suppress checks="JavadocStyleCheck" files="src[/\\]test[/\\]java"/>
<suppress checks="IndentationCheck" files=".*\.java$"/>
<suppress checks="MultipleStringLiterals" files="src[/\\]test[/\\]java"/>
<suppress checks="MultipleVariableDeclarations" files="src[/\\]test[/\\]java"/>
</suppressions>
Copyright 2016 Amherst College
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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment