diff --git a/build.gradle b/build.gradle index 5168769d937..ec69a09c4ed 100644 --- a/build.gradle +++ b/build.gradle @@ -26,6 +26,7 @@ plugins { id 'com.google.protobuf' id 'java' id 'checkstyle' + id 'org.nosphere.apache.rat' } subprojects { @@ -43,6 +44,7 @@ allprojects { apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'signing' + apply plugin: 'org.nosphere.apache.rat' apply plugin: "checkstyle" checkstyle { toolVersion "${checkStyleVersion}" @@ -61,6 +63,49 @@ allprojects { from sourceSets.test.output } + // TODO- Seperate rat plugins and other plugins configuration in seperate files + rat { + excludes = [ + '**/.*/**', + '**/*.ipr', + '**/out/**', + '**/generated/**', + '**/build/**', + '**/.idea/**', + '.git/**/*', + '.github/**/*', + '**/.gitignore', + '**/.svn/**/*', + '**/target/**/*', + '**/README.md', + '**/README.rst', + '**/apidocs/*', + '**/src/main/resources/deps/**', + '**/META-INF/**', + '**/.classpath', + '**/.project', + '**/.checkstyle', + '**/.settings/*', + '**/*.iml', + '**/*.iws', + '**/*.ipr', + 'site/**', + 'site2/**', + '**/*.log', + 'data/**', + 'dev/.vagrant/**', + '**/proto/**.py', + '**/keyStoreClientPassword.txt', + '**/keyStoreServerPassword.txt', + '**/proc_cpuinfo.txt', + '**/__pycache__/**', + '**/bookkeeper.egg-info/**', + '**/apache_bookkeeper_client.egg-info/**', + '**/pip-selfcheck.json', + '**/test_conf_2.conf' + ] + } + configurations { testArtifacts.extendsFrom testRuntime } diff --git a/gradle.properties b/gradle.properties index 6a2b31350ad..6caefd9b1be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,6 +20,7 @@ # protobufPluginVersion=0.8.15 +apcheRatPluginVersion=0.7.0 shadowPluginVersion=6.1.0 licenseGradlePluginVersion=0.15.0 checkStyleVersion=6.19 diff --git a/settings.gradle b/settings.gradle index 865d79edfef..c7248353221 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,6 +19,7 @@ pluginManagement { plugins { id "com.google.protobuf" version "${protobufPluginVersion}" + id "org.nosphere.apache.rat" version "${apcheRatPluginVersion}" id "com.github.johnrengelman.shadow" version "${shadowPluginVersion}" id "com.github.hierynomus.license" version "${licenseGradlePluginVersion}" }