From 310e0ec4a32dc53cc234eb471e68c8a3aedf216e Mon Sep 17 00:00:00 2001 From: Prashant Date: Thu, 8 Apr 2021 10:06:00 -0700 Subject: [PATCH] ISSUE-2640: BP-43: Gradle integration with RAT plugin --- build.gradle | 46 +++++++++++++++++++++++++++++++++++++++++++++- gradle.properties | 3 ++- settings.gradle | 1 + 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index df1b3d0c96f..638b4065722 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,7 @@ buildscript { plugins { id 'com.google.protobuf' id 'java' + id 'org.nosphere.apache.rat' } subprojects { @@ -43,12 +44,55 @@ allprojects { apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'signing' - + apply plugin: 'org.nosphere.apache.rat' task testJar(type: Jar, dependsOn: testClasses) { classifier = 'tests' 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 bde51416644..6353bcd74cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,4 +19,5 @@ # # -protobufPluginVersion=0.8.15 \ No newline at end of file +protobufPluginVersion=0.8.15 +apcheRatPluginVersion=0.7.0 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 4ef33749828..227e0a81007 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}" } }