You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2020/08/20 19:34:23 UTC

Re: [jmeter] branch master updated: Fix Gradle deprecations: replace testCompile with testImplementation

Short remark on naming things inside.

And yes, naming is a hard problem.


Am 20. August 2020 21:30:36 MESZ schrieb vladimirsitnikov@apache.org:
>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 769a2a1  Fix Gradle deprecations: replace testCompile with
>testImplementation
>769a2a1 is described below
>
>commit 769a2a1b68d4f963bd38c0f706997b2f5bb875b0
>Author: Vladimir Sitnikov <si...@gmail.com>
>AuthorDate: Thu Aug 20 22:30:18 2020 +0300
>
>   Fix Gradle deprecations: replace testCompile with testImplementation
>    
>The difference is testImplementation is not "transitive" which is a
>good
>    thing anyway as it avoids having too much classes in the classpath.
>---
> src/components/build.gradle.kts | 2 +-
> src/core/build.gradle.kts       | 2 +-
> src/dist-check/build.gradle.kts | 2 +-
> src/dist/build.gradle.kts       | 7 ++++++-
> src/functions/build.gradle.kts  | 2 +-
> src/protocol/build.gradle.kts   | 6 +++---
> 6 files changed, 13 insertions(+), 8 deletions(-)
>
>diff --git a/src/components/build.gradle.kts
>b/src/components/build.gradle.kts
>index 51a8b12..c183f1b 100644
>--- a/src/components/build.gradle.kts
>+++ b/src/components/build.gradle.kts
>@@ -17,7 +17,7 @@
> 
> dependencies {
>     api(project(":src:core"))
>-    testCompile(project(":src:core", "testClasses"))
>+    testImplementation(project(":src:core", "testClasses"))
> 
>     api("org.apache-extras.beanshell:bsh") {
>         because("""
>diff --git a/src/core/build.gradle.kts b/src/core/build.gradle.kts
>index 35b6e3a..fdfec49 100644
>--- a/src/core/build.gradle.kts
>+++ b/src/core/build.gradle.kts
>@@ -22,7 +22,7 @@ plugins {
> dependencies {
>     api(project(":src:launcher"))
>     api(project(":src:jorphan"))
>-    testCompile(project(":src:jorphan", "testClasses"))
>+    testImplementation(project(":src:jorphan", "testClasses"))
> 
>     api("bsf:bsf") {
>         because("protected BSFManager BSFTestElement#getManager()")
>diff --git a/src/dist-check/build.gradle.kts
>b/src/dist-check/build.gradle.kts
>index 52bb13e..10abdde 100644
>--- a/src/dist-check/build.gradle.kts
>+++ b/src/dist-check/build.gradle.kts
>@@ -30,7 +30,7 @@ val loggingClasspath by configurations.creating
> 
> dependencies {
>     api(project(":src:dist"))
>-    testCompile(project(":src:dist", "testClasses"))
>+    testImplementation(project(":src:dist", "allTestClasses"))
>     testImplementation("org.apache.commons:commons-lang3") {
>         because("StringUtils")
>     }
>diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
>index 0966ad3..c395ed6 100644
>--- a/src/dist/build.gradle.kts
>+++ b/src/dist/build.gradle.kts
>@@ -64,12 +64,17 @@ val srcLicense by configurations.creating {
>     isCanBeConsumed = false
> }
> 
>+val allTestClasses by configurations.creating {
>+    isCanBeConsumed = true

Could be named isConsumable and isResolvable. 

Regards 
 Felix 

>+    isCanBeResolved = false
>+}
>+
>// Note: you can inspect final classpath (list of jars in the binary
>distribution)  via
> // gw dependencies --configuration runtimeClasspath
> dependencies {
>     for (p in jars) {
>         api(project(p))
>-        testCompile(project(p, "testClasses"))
>+        allTestClasses(project(p, "testClasses"))
>     }
> 
>     binLicense(project(":src:licenses", "binLicense"))
>diff --git a/src/functions/build.gradle.kts
>b/src/functions/build.gradle.kts
>index 803ac69..3a16b5e 100644
>--- a/src/functions/build.gradle.kts
>+++ b/src/functions/build.gradle.kts
>@@ -17,7 +17,7 @@
> 
> dependencies {
>     api(project(":src:components"))
>-    testCompile(project(":src:components", "testClasses"))
>+    testImplementation(project(":src:core", "testClasses"))
> 
>     implementation("org.mozilla:rhino")
>     implementation("commons-codec:commons-codec")
>diff --git a/src/protocol/build.gradle.kts
>b/src/protocol/build.gradle.kts
>index a23f529..aca2843 100644
>--- a/src/protocol/build.gradle.kts
>+++ b/src/protocol/build.gradle.kts
>@@ -18,7 +18,7 @@
> subprojects {
>     dependencies {
>         api(project(":src:core"))
>-        testCompile(project(":src:core", "testClasses"))
>+        testImplementation(project(":src:core", "testClasses"))
>     }
> }
> 
>@@ -47,7 +47,7 @@ project("http") {
>     dependencies {
>         // for SearchTextExtension
>         api(project(":src:components"))
>-        testCompile(project(":src:components", "testClasses"))
>+        testImplementation(project(":src:components", "testClasses"))
> 
>         api("com.thoughtworks.xstream:xstream") {
>             because("HTTPResultConverter uses XStream in public API")
>@@ -115,7 +115,7 @@ project("jdbc") {
> 
> project("jms") {
>     dependencies {
>-        testCompile(project(":src:core", "testClasses"))
>+        testImplementation(project(":src:core", "testClasses"))
>         api("com.github.ben-manes.caffeine:caffeine") {
> because("MessageRenderer#getValueFromFile(..., caffeine.cache.Cache)")
>         }

Re: [jmeter] branch master updated: Fix Gradle deprecations: replace testCompile with testImplementation

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 20.08.20 um 22:18 schrieb Vladimir Sitnikov:
>> Could be named isConsumable and isResolvable
> That is Gradle public API, so I can't influence the naming:
> https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/Configuration.html#isCanBeConsumed--
> I agree it sounds weird.
>
> isCanBeConsumed / isCanBeResolved have been added long ago, and they are
> planning to replace the properties with an enum or something like that.

Cool. Good to know.

Felix

>
> Vladimir
>

Re: [jmeter] branch master updated: Fix Gradle deprecations: replace testCompile with testImplementation

Posted by Vladimir Sitnikov <si...@gmail.com>.
>Could be named isConsumable and isResolvable

That is Gradle public API, so I can't influence the naming:
https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/Configuration.html#isCanBeConsumed--
I agree it sounds weird.

isCanBeConsumed / isCanBeResolved have been added long ago, and they are
planning to replace the properties with an enum or something like that.

Vladimir