jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] branch master updated: Fix Gradle warnings: duplicate entries in processResources, compile configuration
Date Thu, 20 Aug 2020 18:40:06 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 9acded5  Fix Gradle warnings: duplicate entries in processResources, compile configuration
9acded5 is described below

commit 9acded5a7a06c7839d021edb9012e6dce5ea7371
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Thu Aug 20 21:39:36 2020 +0300

    Fix Gradle warnings: duplicate entries in processResources, compile configuration
---
 build.gradle.kts                                   | 26 +++++++++-------------
 .../subprojects/batchtest/batchtest.gradle.kts     |  2 +-
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index ecf804f..6eb8d38 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -462,21 +462,17 @@ allprojects {
                 options.encoding = "UTF-8"
             }
             withType<ProcessResources>().configureEach {
-                from(source) {
-                    include("**/*.properties")
-                    filteringCharset = "UTF-8"
-                    // apply native2ascii conversion since Java 8 expects properties to have
ascii symbols only
-                    filter(org.apache.tools.ant.filters.EscapeUnicode::class)
-                    filter(LineEndings.LF)
-                }
-                // Text-like resources are normalized to LF (just for consistency purposes)
-                // This makes to produce exactly the same jar files no matter which OS is
used for the build
-                from(source) {
-                    include("**/*.dtd")
-                    include("**/*.svg")
-                    include("**/*.txt")
-                    filteringCharset = "UTF-8"
-                    filter(LineEndings.LF)
+                filteringCharset = "UTF-8"
+                eachFile {
+                    if (name.endsWith(".properties")) {
+                        filteringCharset = "UTF-8"
+                        // apply native2ascii conversion since Java 8 expects properties
to have ascii symbols only
+                        filter(org.apache.tools.ant.filters.EscapeUnicode::class)
+                        filter(LineEndings.LF)
+                    } else if (name.endsWith(".dtd") || name.endsWith(".svg") ||
+                        name.endsWith(".txt")) {
+                        filter(LineEndings.LF)
+                    }
                 }
             }
             afterEvaluate {
diff --git a/buildSrc/subprojects/batchtest/batchtest.gradle.kts b/buildSrc/subprojects/batchtest/batchtest.gradle.kts
index 83ad498..3c8b01e 100644
--- a/buildSrc/subprojects/batchtest/batchtest.gradle.kts
+++ b/buildSrc/subprojects/batchtest/batchtest.gradle.kts
@@ -17,7 +17,7 @@
  */
 
 dependencies {
-    compile("org.ajoberstar.grgit:grgit-gradle:3.1.1")
+    implementation("org.ajoberstar.grgit:grgit-gradle:3.1.1")
 }
 
 gradlePlugin {


Mime
View raw message