Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update from Gradle 6.9 to Gradle 8.0 (#168)
* Bump Gradle Wrapper to Gradle 8.0 (from 6.9) * Remove outdated DSL: kotlinDslPluginOptions.experimentalWarning > Configure project :buildSrc e: P:\projects\contrib\github-nexus-publish-plugin\buildSrc\build.gradle.kts:14:5: Unresolved reference: experimentalWarning > Configure project :buildSrc The KotlinDslPluginOptions.experimentalWarning property has been deprecated. This is scheduled to be removed in Gradle 8.0. Flag has no effect since `kotlin-dsl` no longer relies on experimental features. at Build_gradle$3.execute(build.gradle.kts:14) (Run with --stacktrace to get the full stack trace of this deprecation warning.) * Update Shadow plugin, because 6.1.0 is not compatible with Gradle 7.x and Gradle 8.x * What went wrong: org/gradle/api/plugins/MavenPlugin * Try: > Run with --info or --debug option to get more log output. * Exception is: java.lang.NoClassDefFoundError: org/gradle/api/plugins/MavenPlugin at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin$1.execute(ShadowJavaPlugin.groovy:101) * Regenerate Gradle Wrapper with Gradle 8.0 * Bump Versions plugin, Gradle 7.x support is full-blown from 0.43.0 Gradle 7.4 fixes: https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.42.0 Gradle 7 required: https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.43.0 * Bump plugin-publish plugin to 1.x pluginBundle was deprecated in Gradle 7.6 and removed in Gradle 8.0: https://plugins.gradle.org/plugin/com.gradle.plugin-publish/1.0.0 maven-publish is auto-applied * Lock in Java compilation version to the same as Kotlin, otherwise things can go wrong. > Task :compileKotlin FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileKotlin'. > 'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version. Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain * ConfigureUtil is deprecated in Gradle 7.1 and started nagging in Gradle 7.6. Building with Gradle 8.0 will obviously also warn. Let's suppress it for now, this will be dealt with in #152 * Add support for Spotless on Windows Also in #167, but it's annoying not being able to get a green build locally. * Move sourceCompatibility to the existing java block * Keep building Kotlin with 1.3 compatibility, otherwise there are failures on older Gradle versions. For example: NexusPublishPluginTests.should close staging repository ``` > Task :closeSonatypeStagingRepository FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':closeSonatypeStagingRepository'. > kotlin.jvm.internal.PropertyReference1Impl.<init>(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V ``` * Silence unnecessary build warnings. > Task :compileKotlin w: API version 1.3 is deprecated and its support will be removed in a future version of Kotlin > Task :compileTestKotlin w: API version 1.3 is deprecated and its support will be removed in a future version of Kotlin > Task :compileCompatTestKotlin w: API version 1.3 is deprecated and its support will be removed in a future version of Kotlin * Remove duplicate calls to withSourcesJar It's done by the plugin-publish plugin too. In the Gradle Metadata (.module) it duplicates artifacts if called multiple times. * Remove unnecessary shadowed configuration There is built-in support for standard configuration in plugin-publish and shadow plugins. * Remove unidentified workaround It doesn't change anything in the output publishToMavenLocal, it was probably for an older combination of Gradle / plugin-publish / shadow plugins. * Work around unnecessary ClassPath in MANIFEST.MF * Downgrade language version from Kotlin 1.8 to Kotlin 1.3 to generate compatible @kotlin.Metadata in the .class files. * Remove unrelated change. * Diagnose #168 (comment) * Revert "Diagnose #168 (comment)" This reverts commit c14acc5. * Mention Kotlin 1.3 #168 (comment) * Reduce CI load, re #168 (comment) * Diagnose #168 (comment) * Revert "Diagnose #168 (comment)" This reverts commit 8488741. * Add sha256 to wrapper
- Loading branch information