]> source.dussan.org Git - poi.git/commitdiff
Gradle: Add support for rat-check and initial target "jenkins"
authorDominik Stadler <centic@apache.org>
Sun, 28 Mar 2021 19:54:57 +0000 (19:54 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 28 Mar 2021 19:54:57 +0000 (19:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888139 13f79535-47bb-0310-9956-ffa450edef68

build.gradle

index b9327fcf23a305799217ad6a53e6137b89dd4f8f..3545352b61e43fc331ccc643a9fe3b53b26cf147 100644 (file)
@@ -24,6 +24,10 @@ buildscript {
     }
 }
 
+plugins {
+    id("org.nosphere.apache.rat") version "0.7.0"
+}
+
 repositories {
     mavenCentral()
 }
@@ -198,4 +202,54 @@ subprojects {
             }
         }
     }
-}
\ No newline at end of file
+
+    task jenkins
+    jenkins.dependsOn build
+    jenkins.dependsOn check
+    jenkins.dependsOn javadoc
+    jenkins.dependsOn jacocoTestReport
+    jenkins.dependsOn rat
+}
+
+rat {
+    // Input directory, defaults to '.'
+    inputDir.set(file("."))
+
+    // include all directories which contain files that are included in releases
+    includes.add("examples/**")
+    includes.add("excelant/**")
+    includes.add("integrationtest/**")
+    includes.add("legal/**")
+    includes.add("main/**")
+    includes.add("maven/**")
+    includes.add("ooxml/**")
+    includes.add("ooxml-schema/**")
+    //includes.add("osgi/**")
+    includes.add("scratchpad/**")
+    includes.add("src/**")
+    //includes.add("sonar/**")
+    includes.add("build.*")
+
+    // List of Gradle exclude directives, defaults to ['**/.gradle/**']
+    //excludes.add("main/java/org/apache/poi/**/*-chart-data.txt")
+    excludes.add("**/build/**")
+    excludes.add("**/out/**")
+    excludes.add("**/*.iml")
+    excludes.add("**/*.log")
+    excludes.add("**/main/java/org/apache/poi/**/*-chart-data.txt")
+    excludes.add("main/src/main/resources/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml")
+    excludes.add("ooxml/src/main/resources/org/apache/poi/xslf/usermodel/notesMaster.xml")
+    excludes.add("ooxml/src/main/resources/org/apache/poi/xssf/usermodel/presetTableStyles.xml")
+    excludes.add("ooxml-schema/src/main/xmlschema/org/apache/poi/schemas/XAdES*.xsd")
+    excludes.add("ooxml-schema/src/main/xmlschema/org/apache/poi/schemas/xmldsig-core-schema.xsd")
+    excludes.add("ooxml-schema/src/main/xmlschema/org/apache/poi/xdgf/visio.xsd")
+    /*
+    <exclude name="documentation/*.txt" />
+    <exclude name="documentation/content/xdocs/dtd/" />
+    <exclude name="documentation/content/xdocs/entity/" />
+    <exclude name="documentation/resources/images/pb-poi.cdr"/>
+    */
+
+    // Prints the list of files with unapproved licences to the console, defaults to false
+    verbose.set(true)
+}