-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle 7.6 to 8.2 (conventions to extensions migration, mostly) #3051
Conversation
`org.gradle.util.CollectionUtils.join(java.lang.String, java.lang.Object[])` to `org.codehaus.groovy.runtime.DefaultGroovyMethods.join(T[], java.lang.String)` Original method was non-trivial from looking at Groovy code, by default everything in basic `org.gradle`, `org.gradle.utils` and other packages are visible, and there was a `CollectionUtils` in `org.gradle.utils`. > Task :osgi-test:test The org.gradle.util.CollectionUtils type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.6/userguide/upgrading_version_7.html#org_gradle_util_reports_deprecations at RuntimeBundlesProvider.asArguments(subprojects\osgi-test\osgi-test.gradle:58)
Triggered by seeing: > Task :inlineTest:test Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option --illegal-access=deny; support was removed in 17.0
Benefits of using the built-in method: * Repository is nicely named in error messages. * Ability to override the URL with an option. * Anything else they maintain into the method. Equivalence can be seen in the Gradle sources: org.gradle.api.internal.artifacts.BaseRepositoryFactory#PLUGIN_PORTAL_DEFAULT_URL org.gradle.api.internal.artifacts.repositories.DefaultBaseRepositoryFactory.createGradlePluginPortal
…in favor of AbstractArchiveTask.archiveClassifier: Property<String> * Where: Script 'P:\projects\contrib\github-mockito\gradle\java-publication.gradle' line: 11 * What went wrong: A problem occurred evaluating script. > Could not set unknown property 'classifier' for task ':sourcesJar' of type org.gradle.api.tasks.bundling.Jar.
…ct(java-library) > Configure project : Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 4 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:4) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39) Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 4 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:4) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39)
> Configure project : Build file 'P:\projects\contrib\github-mockito\build.gradle': line 33 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:33) Build file 'P:\projects\contrib\github-mockito\build.gradle': line 33 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:33)
…tibility/targetCompatibility in :kotlinTest > Configure project :kotlinTest Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle': line 13 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at kotlinTest_4dthjsdim02q2m8eqg53ey7d6.run(P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle:13) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle': line 13 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at kotlinTest_4dthjsdim02q2m8eqg53ey7d6.run(P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle:13) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle': line 14 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at kotlinTest_4dthjsdim02q2m8eqg53ey7d6.run(P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle:14) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle': line 14 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at kotlinTest_4dthjsdim02q2m8eqg53ey7d6.run(P:\projects\contrib\github-mockito\subprojects\kotlinTest\kotlinTest.gradle:14)
…tibility/targetCompatibility in :module-test > Configure project :module-test Build file 'P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle': line 17 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at module_test_8l1qkgv9tkbnbn3rebob52w22.run(P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle:17) Build file 'P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle': line 17 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at module_test_8l1qkgv9tkbnbn3rebob52w22.run(P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle:17) Build file 'P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle': line 18 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at module_test_8l1qkgv9tkbnbn3rebob52w22.run(P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle:18) Build file 'P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle': line 18 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at module_test_8l1qkgv9tkbnbn3rebob52w22.run(P:\projects\contrib\github-mockito\subprojects\module-test\module-test.gradle:18)
…tibility/targetCompatibility in :programmatic-test > Configure project :programmatic-test Build file 'P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle': line 17 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at programmatic_test_c04nb5m0tshylcbddqjmazz4a.run(P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle:17) Build file 'P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle': line 17 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at programmatic_test_c04nb5m0tshylcbddqjmazz4a.run(P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle:17) Build file 'P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle': line 18 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at programmatic_test_c04nb5m0tshylcbddqjmazz4a.run(P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle:18) Build file 'P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle': line 18 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at programmatic_test_c04nb5m0tshylcbddqjmazz4a.run(P:\projects\contrib\github-mockito\subprojects\programmatic-test\programmatic-test.gradle:18)
…tibility/targetCompatibility in :kotlinReleaseCoroutinesTest > Configure project :kotlinReleaseCoroutinesTest Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle': line 23 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at kotlinReleaseCoroutinesTest_4gvim63h8lqyzlietq7g68p6p.run(P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle:23) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle': line 23 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at kotlinReleaseCoroutinesTest_4gvim63h8lqyzlietq7g68p6p.run(P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle:23) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle': line 24 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at kotlinReleaseCoroutinesTest_4gvim63h8lqyzlietq7g68p6p.run(P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle:24) Build file 'P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle': line 24 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at kotlinReleaseCoroutinesTest_4gvim63h8lqyzlietq7g68p6p.run(P:\projects\contrib\github-mockito\subprojects\kotlinReleaseCoroutinesTest\kotlinReleaseCoroutinesTest.gradle:24)
…tibility/targetCompatibility in :inlineTest > Configure project :inlineTest Build file 'P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle': line 9 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at inlineTest_65ce95w453s169qvsfsjwueh8.run(P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle:9) Build file 'P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle': line 9 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at inlineTest_65ce95w453s169qvsfsjwueh8.run(P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle:9) Build file 'P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle': line 10 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at inlineTest_65ce95w453s169qvsfsjwueh8.run(P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle:10) Build file 'P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle': line 10 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at inlineTest_65ce95w453s169qvsfsjwueh8.run(P:\projects\contrib\github-mockito\subprojects\inlineTest\inlineTest.gradle:10)
…tibility/targetCompatibility in rootProject(java-library) > Configure project : Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 17 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:17) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39) Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 17 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:17) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39) Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 18 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:18) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39) Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 18 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_library_31pwb6uziesoanbjna4tijtgv.run(P:\projects\contrib\github-mockito\gradle\java-library.gradle:18) at build_e6jjcbuu9ezmj4rzb0cym1acv.run(P:\projects\contrib\github-mockito\build.gradle:39)
> Configure project :bom Build file 'P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle': line 7 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at bom_acs6qbt4gpp4vgam5esl3gldr.run(P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle:7) Build file 'P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle': line 7 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at bom_acs6qbt4gpp4vgam5esl3gldr.run(P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle:7) Build file 'P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle': line 8 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at bom_acs6qbt4gpp4vgam5esl3gldr.run(P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle:8) Build file 'P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle': line 8 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at bom_acs6qbt4gpp4vgam5esl3gldr.run(P:\projects\contrib\github-mockito\subprojects\bom\bom.gradle:8)
…ct(java-publication) > Configure project : Script 'P:\projects\contrib\github-mockito\gradle\java-publication.gradle': line 51 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at java_publication_3m1q2um515b0jc9w5l4jkv2vf$_run_closure3$_closure11$_closure13.doCall(P:\projects\contrib\github-mockito\gradle\java-publication.gradle:51) at java_publication_3m1q2um515b0jc9w5l4jkv2vf$_run_closure3$_closure11.doCall(P:\projects\contrib\github-mockito\gradle\java-publication.gradle:41) Script 'P:\projects\contrib\github-mockito\gradle\java-publication.gradle': line 51 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_publication_3m1q2um515b0jc9w5l4jkv2vf$_run_closure3$_closure11$_closure13.doCall(P:\projects\contrib\github-mockito\gradle\java-publication.gradle:51) at java_publication_3m1q2um515b0jc9w5l4jkv2vf$_run_closure3$_closure11.doCall(P:\projects\contrib\github-mockito\gradle\java-publication.gradle:41)
…t.outputLocation: Property<FileSystemLocation> > Configure project : Script 'P:\projects\contrib\github-mockito\gradle\root\coverage.gradle': line 40 The Report.destination property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the outputLocation property instead. For more information, please refer to https://docs.gradle.org/8.2-rc-3/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:destination in the Gradle documentation. at coverage_bdrf6ncoyqn26tscdjn3v6kje$_run_closure1$_closure4.doCall(P:\projects\contrib\github-mockito\gradle\root\coverage.gradle:40) at coverage_bdrf6ncoyqn26tscdjn3v6kje$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\root\coverage.gradle:37)
… at BundleTaskConvention, which is deprecated in `biz.aQute.bnd.builder` plugin. Migrated to BundleTaskExtension. (see more details below) > Configure project : Script 'P:\projects\contrib\github-mockito\gradle\mockito-core\osgi.gradle': line 4 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at osgi_1s7hu8z26iat6hd1sfy12d5of$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\mockito-core\osgi.gradle:4) at osgi_1s7hu8z26iat6hd1sfy12d5of.run(P:\projects\contrib\github-mockito\gradle\mockito-core\osgi.gradle:3) > Configure project :junit-jupiter Build file 'P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle': line 21 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at junit_jupiter_eg2xy6r7a4uptto82iioip1km$_run_closure3.doCall(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:21) at junit_jupiter_eg2xy6r7a4uptto82iioip1km.run(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:20) How I found it? * Put a breakpoint at `classpath =` line * then step into ScriptBytecodeAdapter.setGroovyObjectProperty * at CompositeDynamicObject.trySetProperty it loops through 3 objects (:jar task, Jar_Decorated and extensions) * extensions had a plugin: BundleTaskConvention * BeanDynamicObject.setProperty found "classpath" in MetaClass * This called into BundleTaskConvention.setClasspath * Here, it delegates to BundleTaskExtension * The extension is registered on Jar task with name "bundle" in BndBuilderPlugin
… BundleTaskConvention, which is deprecated in `biz.aQute.bnd.builder` plugin. Migrated to BundleTaskExtension. Indented string + stripIndent() confirmed exactly the same in debugger. See previous commit for more details. > Configure project :osgi-test Script 'P:\projects\contrib\github-mockito\subprojects\osgi-test\osgi-test-bundles.gradle': line 37 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at osgi_test_bundles_csbv7oq8300mvl43ktyjdy8bd$_run_closure5.doCall(P:\projects\contrib\github-mockito\subprojects\osgi-test\osgi-test-bundles.gradle:37) at osgi_test_bundles_csbv7oq8300mvl43ktyjdy8bd.run(P:\projects\contrib\github-mockito\subprojects\osgi-test\osgi-test-bundles.gradle:35)
> Configure project :junitJupiterExtensionTest w: file:///P:/projects/contrib/github-mockito/subprojects/junitJupiterExtensionTest/junitJupiterExtensionTest.gradle.kts:22:44: Unchecked cast: Any? to Map<String, Any> > Configure project :junitJupiterInlineMockMakerExtensionTest w: file:///P:/projects/contrib/github-mockito/subprojects/junitJupiterInlineMockMakerExtensionTest/junitJupiterInlineMockMakerExtensionTest.gradle.kts:22:44: Unchecked cast: Any? to Map<String, Any>
> Configure project :androidTest The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation The Report.destination property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the outputLocation property instead. For more information, please refer to https://docs.gradle.org/8.2-rc-3/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:destination in the Gradle documentation. and probably fixes these too: > Task :androidTest:lintAnalyzeDebug e: Z:/caches/gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/otlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: Z:/caches/gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: Z:/caches/gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.22/636bf8b320e7627482771bbac9ed7246773c02bd/kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: Z:/caches/gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.22/1a8e3601703ae14bb58757ea6b2d8e8e5935a586/kotlin-stdlib-common-1.8.22.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. e: P:/projects/contrib/github-mockito/subprojects/androidTest/build/intermediates/compile_app_classes_jar/debug/classes.jar!/META-INF/androidTest_debug.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
> Task :android:generatePomFileForJavaLibraryPublication Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 14 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_library_31pwb6uziesoanbjna4tijtgv$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\java-library.gradle:14) (Run with --stacktrace to get the full stack trace of this deprecation warning.) > Task :proxy:generatePomFileForJavaLibraryPublication Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 13 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at java_library_31pwb6uziesoanbjna4tijtgv$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\java-library.gradle:13) (Run with --stacktrace to get the full stack trace of this deprecation warning.) > Task :junit-jupiter:generatePomFileForJavaLibraryPublication Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 13 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at java_library_31pwb6uziesoanbjna4tijtgv$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\java-library.gradle:13) (Run with --stacktrace to get the full stack trace of this deprecation warning.) > Task :subclass:generatePomFileForJavaLibraryPublication Script 'P:\projects\contrib\github-mockito\gradle\java-library.gradle': line 14 The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#base_convention_deprecation at java_library_31pwb6uziesoanbjna4tijtgv$_run_closure1.doCall(P:\projects\contrib\github-mockito\gradle\java-library.gradle:14) (Run with --stacktrace to get the full stack trace of this deprecation warning.)
…ePluginExtension.getArchivesName(): Property<String> There's no nagging for this ([yet](gradle/gradle#22908)), but it's scheduled for removal in Gradle 9. JavaDoc: https://docs.gradle.org/7.1/javadoc/org/gradle/api/plugins/BasePluginExtension.html Upgrade guide (7.0 to 7.1): https://docs.gradle.org/8.1/userguide/upgrading_version_7.html#base_convention_deprecation Short note on syntax: in the Gradle property API .get() and .set() are required for updating the value of the property, except in Groovy build scripts where the accessor is clearly setting a property value. x.y = z is equivalent to x.y.set(z). Kotlin DSL will also make this possible soon.
…avor of WriteProperties.getDestinationFile(): RegularFileProperty > Configure project : Build file 'P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle': line 41 The WriteProperties.outputFile property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the destinationFile property instead. For more information, please refer to https://docs.gradle.org/8.2-rc-3/dsl/org.gradle.api.tasks.WriteProperties.html#org.gradle.api.tasks.WriteProperties:outputFile in the Gradle documentation. at junit_jupiter_eg2xy6r7a4uptto82iioip1km$_run_closure4.doCall(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:41) > Task :junit-jupiter:verifyOSGi Build file 'P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle': line 52 The WriteProperties.outputFile property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the destinationFile property instead. For more information, please refer to https://docs.gradle.org/8.2-rc-3/dsl/org.gradle.api.tasks.WriteProperties.html#org.gradle.api.tasks.WriteProperties:outputFile in the Gradle documentation. at junit_jupiter_eg2xy6r7a4uptto82iioip1km$_run_closure5$_closure8.doCall(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:52)
…tibility in :junit-jupiter Build file 'P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle': line 43 The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#java_convention_deprecation at junit_jupiter_eg2xy6r7a4uptto82iioip1km$_run_closure4.doCall(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:43) Build file 'P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle': line 43 The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#deprecated_access_to_conventions at junit_jupiter_eg2xy6r7a4uptto82iioip1km$_run_closure4.doCall(P:\projects\contrib\github-mockito\subprojects\junit-jupiter\junit-jupiter.gradle:43)
The ProjectComponentSelector.getBuildName() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Use getBuildPath() to get a unique identifier for the build. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-rc-3/userguide/upgrading_version_8.html#build_identif ier_name_and_current_deprecation at org.gradle.internal.component.local.model.DefaultProjectComponentSelector.getBuildName(DefaultProjectComponentSelector.java:83) at com.gradle.scan.plugin.internal.b.e.a.g$b.a(SourceFile:390) at com.gradle.scan.plugin.internal.b.e.a.g$b.a(SourceFile:360) at com.gradle.scan.plugin.internal.b.e.a.g$b.a(SourceFile:355) at com.gradle.scan.plugin.internal.b.e.a.g.a(SourceFile:113) at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220) at com.gradle.scan.plugin.internal.b.e.a.g.a(SourceFile:113) at com.gradle.scan.plugin.internal.b.e.a.g.a(SourceFile:109) at com.gradle.scan.plugin.internal.b.e.a.h$a.a(SourceFile:138) at com.gradle.scan.plugin.internal.b.e.a.h$a.<init>(SourceFile:105) at com.gradle.scan.plugin.internal.b.e.a.h$a.b(SourceFile:119) at com.gradle.scan.plugin.internal.b.e.a.h$a.a(SourceFile:70) at com.gradle.scan.plugin.internal.b.e.a.h.a(SourceFile:51) at com.gradle.scan.plugin.internal.b.e.a.g.a(SourceFile:149) at com.gradle.scan.plugin.internal.b.e.c.a(SourceFile:135) at com.gradle.scan.plugin.internal.l.a.f.a(SourceFile:12) at com.gradle.scan.plugin.internal.l.a$c.finished(SourceFile:154) at com.gradle.scan.plugin.internal.l.a.a(SourceFile:65) at com.gradle.scan.plugin.internal.l.j.a(SourceFile:58) at com.gradle.scan.plugin.internal.l.d.a(SourceFile:103) at com.gradle.scan.plugin.internal.l.f.a(SourceFile:48) at com.gradle.scan.plugin.internal.q.a$a.a(SourceFile:31) at com.gradle.scan.plugin.internal.q.a$a.a(SourceFile:20) at com.gradle.scan.plugin.internal.q.a.c(SourceFile:67) at java.base/java.lang.Thread.run(Thread.java:833)
Also decrease visibility of launcher where not used. > Task :junitJupiterParallelTest:test The automatic loading of test framework implementation dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Declare the desired test framework directly on the test suite or explicitly declare the test framework implementation dependencies on the test's runtime classpath. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
Unknown file extension: src\main\java\org\mockito\internal\util\concurrent\README.md Unknown file extension: src\main\java\org\mockito\internal\util\concurrent\LICENSE Missing header in: subprojects\junitJupiterExtensionTest\src\test\resources\junit-platform.properties Missing header in: subprojects\junitJupiterInlineMockMakerExtensionTest\src\test\resources\junit-platform.properties Missing header in: subprojects\junitJupiterParallelTest\src\test\resources\junit-platform.properties Unknown file extension: subprojects\android\src\main\resources\mockito-extensions\org.mockito.plugins.MemberAccessor Unknown file extension: subprojects\android\src\main\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.DoNotMockEnforcer Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.InstantiatorProvider2 Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockResolver Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockitoLogger Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.PluginSwitch Unknown file extension: subprojects\extTest\src\test\resources\mockito-extensions\org.mockito.plugins.StackTraceCleanerProvider Unknown file extension: subprojects\junitJupiterExtensionTest\src\test\resources\META-INF\services\org.junit.jupiter.api.extension.Extension Unknown file extension: subprojects\junitJupiterInlineMockMakerExtensionTest\src\test\resources\META-INF\services\org.junit.jupiter.api.extension.Extension Unknown file extension: subprojects\junitJupiterInlineMockMakerExtensionTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\kotlinReleaseCoroutinesTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\kotlinTest\src\test\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\proxy\src\main\resources\mockito-extensions\org.mockito.plugins.MemberAccessor Unknown file extension: subprojects\proxy\src\main\resources\mockito-extensions\org.mockito.plugins.MockMaker Unknown file extension: subprojects\subclass\src\main\resources\mockito-extensions\org.mockito.plugins.MemberAccessor Unknown file extension: subprojects\subclass\src\main\resources\mockito-extensions\org.mockito.plugins.MockMaker
…publishToMavenLocal` and println debugging) Here's a little investigation of the history of this block: 20180725 Original issue (mockito 2.20.0): mockito#1444 20180726 Workaround added (mockito 2.20.1): mockito#1446 20180726 Issue that obsoletes the workaround (shipkit 2.0.29): mockito/shipkit#741 20180727 Fix that obsoletes the workaround (shipkit 2.0.30): mockito/shipkit#742 20181221 Attempt at removing ([mockito 2.23.11](https://github.com/mockito/mockito/releases/tag/v2.23.11)): mockito#1575, but shipkit used was still [2.0.28](https://github.com/mockito/mockito/blob/v2.23.11/build.gradle#L14) 20190220 Shipkit version bump that should've removed the workaround (mockito 2.24.6): mockito@866c5d2 (cc @mstachniuk) 20200504 Attempt at removing (mockito 3.3.7): grimreaper@9b4c129 (cc @grimreaper), but PR never raised. 20210116 Shipkit mono-plugin deprecation (shipkit 2.3.5): mockito/shipkit#887 20201028 Shipkit migration (mockito 3.6.1): mockito@7c51297 (cc @mockitoguy)
This reverts commit de0e384.
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #3051 +/- ##
=========================================
Coverage 85.69% 85.69%
Complexity 2874 2874
=========================================
Files 326 326
Lines 8727 8727
Branches 1077 1077
=========================================
Hits 7479 7479
Misses 971 971
Partials 277 277 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks for going through all of them!
Whoops, ordering problem at https://github.com/mockito/mockito/actions/runs/5457593285/jobs/9931914322 |
Don't be alarmed by the number of commits, they're 1-4 lines each.
When squashing, please remove the commit details, keep only the title!
Note: each commit in the PR shows why the change was made, expand the commit messages during review!
Summary
A lot of this PR is fixing warning naggings introduced in 8.2, but for 7.x deprecations.
So their preferred migration paths are available in earlier versions too (7.6 / 8.0 / 8.1), and deprecations can usually be fixed way in advance of nagging.
Happy to downgrade to Gradle 7.6/8.0 to fix problems and upgrade Gradle to latest separately, if necessary.
Remaining problems during
gradlew build
after this PRNot related to Gradle
Gradle vs
configuration :jacocoAgent
Resolution of the configuration :jacocoAgent was attempted from a context different than the project context.
is a warning that needs investigation. It wasn't obvious at first glance what to fix here.Edit: fix in #3052, the problem was calling
rootProject.extensions.jacoco.applyTo(otherProject.tasks.test)
which leaked therootProject.configurations.jacocoAgent
intootherProject
's context.Conventions vs Extensions
Accessing a property on default build script scope (e.g.
foo
infoo = bar
) resolves that property through various magic steps (this is called convention), Gradle has started a move to being explicit by using the extension as a prefix to access properties directly, thus reducing globally available properties (i.e.myExtName.foo = bar
). These also work with lambdas the same way (i.e.myExtName { foo = bar }
). There are examples of JavaPluginConvention to JavaPluginExtension (java.
) andBasePluginConvention
toBasePluginExtension
(base.
) migrations in this PR. SimilarlyBundleTaskExtension
(bundle.
) was preferred overBundleTaskConvention
by nesting accesses while configuring tasks.Gradle 8.2 vs
nexus
See gradle-nexus/publish-plugin#226
Gradle 8.2 vs
bnd
is not fixable yet, because bnd registers the convention always, so there's no way to turn it off.
See bndtools/bnd#5714 for more details.
Gradle 8.1 vs 8.2
It seems we cannot use Gradle 8.2 yet, because bndtools/bnd#5695 is not yet released.See https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#deferred_or_avoided_configuration_of_some_tasks for more details.
I compared
gradlew clean publishToMavenLocal --rerun-tasks --no-build-cache --no-daemon
generated artifacts on Gradle 7.6, 8.1 and 8.2 and they were all the same in this regard.ZIP contents
Some .jar files differ in one byte over and over again for each zip entry.
This byte represents the "Version needed to extract (minimum)" according to wiki. I'm not sure if this is a deal-breaker in upgrading to Gradle 8.x. It only seems to affect some .jar files, not all of them. I tried hard to make the build as clean as possible for comparison with
gradlew clean publishToMavenLocal --rerun-tasks --no-build-cache --no-daemon
Root cause is documented in the upgrade guide (Gradle changed the "ZIP" library.)
Checklist
including project members to get a better picture of the change
commit is meaningful and help the people that will explore a change in 2 years
Fixes #<issue number>
in the description if relevantFixes #<issue number>
if relevant