Skip to content

Commit

Permalink
Merge branch 'pr/142' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
szpak committed Dec 23, 2019
2 parents cb96c32 + b0e86f9 commit eeb1d82
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 13 deletions.
22 changes: 13 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gradle-nexus-staging-plugin changelog

## 0.21.2 - Unreleased

- Workaround incompatibility with Gradle 6.0 caused by a Gradle bug ([#11466](https://github.com/gradle/gradle/issues/11466)) - [#141](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/141) - PR by [Lars Grefer](https://github.com/larsgrefer)

## 0.21.1 - 2019-09-05

- Fix incompatibility of unsupported releasing with legacy upload task with Gradle 5
Expand All @@ -19,10 +23,10 @@
## 0.20.0 - 2019-01-05

- Reuse explicitly created staging repository ID if provided by external plugin - [#77](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/77)
- Fix releasing from Travis - workaround Gradle limitation with Nexus stating repositories with external plugin - [nexus-publish-plugin](https://github.com/marcphilipp/nexus-publish-plugin/) [#76](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/76)
- Fix releasing from Travis - workaround Gradle limitation with Nexus stating repositories with external plugin - [nexus-publish-plugin](https://github.com/marcphilipp/nexus-publish-plugin/) [#76](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/76)
- Raise minimal required Gradle version to 4.8 due to internals modernisation
- Runtime compatibility with Gradle 5.0 and 5.1

**Deprecation note**. Support for implicitly created staging repositories is deprecated. It has been always problematic, slow and error prone
to find a proper staging repository and the recent [changes](https://github.com/travis-ci/travis-ci/issues/9555) in Travis just emphasised that.
Thanks to the new [nexus-publish-plugin](https://github.com/marcphilipp/nexus-publish-plugin/) plugin by
Expand All @@ -31,32 +35,32 @@ explicitly created staging repositories in Nexus. At least in a case of using `m
plugin (the `uploadArchives` task) please refer to [that issue](https://github.com/marcphilipp/nexus-publish-plugin/issues/8).

The original code has not been removed and *should* still work for the time being (if you don't use Travis), but it is no longer officially
supported (e.g. the E2E tests has been switched to the new approach).
supported (e.g. the E2E tests has been switched to the new approach).

## 0.12.0 - 2018-09-29

- Java 11 compatibility (basic path verified by e2e tests) - [#73](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/73)
- Fix crash on non-upload task named 'uploadArchives' - [#67](https://github.com/szpak/CDeliveryBoy/issues/#67)
- Drop support for Java 7
- Drop Gradle 2.x support (not supported by used plugins)
- Drop Gradle 2.x support (not supported by used plugins)
- Upgrade project dependencies
- Upgrade Gradle to 4.10.2

## 0.11.0 - 2017-08-18

- Fail when applied on non-root project - [#47](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/47)
- Less confusing log output without "info" logging enabled - [#60](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/60)
- Less confusing log output without "info" logging enabled - [#60](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/60)
- Upgrade project dependencies
- Upgrade Gradle to 4.1 (compatibility with Gradle 2.0+ should be still maintained)

## 0.10.0 - 2017-08-18

- Configurable repository description in close/release operation - [#63](https://github.com/Codearte/gradle-nexus-staging-plugin/pull/63) - contribution by [akomakom](https://github.com/akomakom)

## 0.9.0 - 2017-06-05

This release provides no new features or bugfixes. It is focused on acceptance E2E testing and Continuous Delivery
with [CDeliveryBoy](https://travis-ci.org/szpak/CDeliveryBoy).
with [CDeliveryBoy](https://travis-ci.org/szpak/CDeliveryBoy).

- Acceptance tests at Gradle level run before release against real Nexus - [#40](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/40)
- Automatic `CHANGELOG.md` synchronization with GitHub releases - [#52](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/52)
Expand All @@ -71,14 +75,14 @@ with [CDeliveryBoy](https://travis-ci.org/szpak/CDeliveryBoy).
- Make functional tests work also on Windows - [#39](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/39)

**Deprecation note**. The ~~promoteRepository~~ and ~~closeAndPromoteRepository~~ tasks are marked as deprecated and will be removed
in one of the future versions. `releaseRepository` and `closeAndReleaseRepository` can be used as drop-in replacements.
in one of the future versions. `releaseRepository` and `closeAndReleaseRepository` can be used as drop-in replacements.

## 0.7.0 - 2017-03-27

- Verify that repository has been really closed - [#21](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/21)
- Re-enable sharing stagingRepositoryId between close and promote - [#46](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/46)
- Basic functional tests with different Gradle versions - [#41](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/41)
- Suggest longer timeout if failed on time related operations even without `--info` enabled - [#34](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/34)
- Suggest longer timeout if failed on time related operations even without `--info` enabled - [#34](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/34)
- Longer default retry period - [#12](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/12)

## 0.6.1 - 2017-03-20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import com.google.common.base.Predicates
import io.codearte.gradle.nexus.NexusStagingPlugin
import nebula.test.functional.ExecutionResult
import nebula.test.functional.GradleRunner
import org.gradle.api.GradleException
import org.gradle.internal.jvm.Jvm
import org.gradle.util.GradleVersion
import spock.lang.Issue
import spock.lang.PendingFeature
import spock.util.Exceptions

import java.util.regex.Pattern
Expand All @@ -18,7 +21,8 @@ class GradleVersionFuncSpec extends BaseNexusStagingFunctionalSpec implements Fu

//Officially 5.0, but 4.10.2 works fine with that plugin
private static final GradleVersion MINIMAL_STABLE_JAVA11_COMPATIBLE_GRADLE_VERSION = GradleVersion.version("4.10.2")
private static final GradleVersion LATEST_GRADLE_VERSION = GradleVersion.version("5.6.1")
private static final GradleVersion LATEST_GRADLE5_VERSION = GradleVersion.version("5.6.3")
private static final GradleVersion LATEST_GRADLE_VERSION = GradleVersion.version("6.0.1")

def "should not fail on #legacyModeMessage plugin logic initialization issue with Gradle #requestedGradleVersion"() {
given:
Expand All @@ -31,6 +35,9 @@ class GradleVersionFuncSpec extends BaseNexusStagingFunctionalSpec implements Fu
${getPluginConfigurationWithNotExistingNexusServer()}
${getLegacyModeConfigurationIfRequested(isInLegacyMode as boolean)} //"as" for Idea
//following to cover regression in @ToString on Extension - https://github.com/Codearte/gradle-nexus-staging-plugin/issues/141
println nexusStaging
""".stripIndent()
when:
ExecutionResult result = runTasksWithFailure('getStagingProfile')
Expand All @@ -47,6 +54,44 @@ class GradleVersionFuncSpec extends BaseNexusStagingFunctionalSpec implements Fu
legacyModeMessage = isInLegacyMode ? "(legacy)" : ""
}

@Issue("https://github.com/Codearte/gradle-nexus-staging-plugin/issues/141")
@PendingFeature(exceptions = GradleException, //StackOverflowError as root cause would be better
reason = "Bug in Gradle 6.x - https://github.com/gradle/gradle/issues/11466")
def "should not fail on @ToString for extension class in Gradle 6.x"() {
given:
gradleVersion = LATEST_GRADLE_VERSION.version
and:
buildFile << """
import groovy.transform.ToString
@ToString(includeFields = true, includeNames = true, includePackage = false)
class ToStringBugDemonstrationExtension {
final Property<String> bugId
ToStringBugDemonstrationExtension(Project project) {
bugId = project.getObjects().property(String)
}
}
class ToStringBugDemonstrationPlugin implements Plugin<Project> {
void apply(Project project) {
def extension = project.extensions.create("toStringExtension", ToStringBugDemonstrationExtension, project)
project.task("printBugId") {
doLast {
println "Bug ID: \${extension.bugId}"
}
}
}
}
apply plugin: ToStringBugDemonstrationPlugin
println "ToString: " + toStringExtension //in fact not needed in that case
"""
expect:
runTasksSuccessfully("printBugId")
}

private String getPluginConfigurationWithNotExistingNexusServer() {
return """
nexusStaging {
Expand Down Expand Up @@ -78,7 +123,7 @@ class GradleVersionFuncSpec extends BaseNexusStagingFunctionalSpec implements Fu

private List<GradleVersion> resolveRequestedGradleVersions() {
return [GradleVersion.version(NexusStagingPlugin.MINIMAL_SUPPORTED_GRADLE_VERSION), MINIMAL_STABLE_JAVA11_COMPATIBLE_GRADLE_VERSION,
LATEST_GRADLE_VERSION].unique()
LATEST_GRADLE5_VERSION, LATEST_GRADLE_VERSION].unique()
}

//Java 9 testing mechanism taken after pitest-gradle-plugin - https://github.com/szpak/gradle-pitest-plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.codearte.gradle.nexus

import groovy.transform.CompileStatic
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import org.gradle.api.Incubating
import org.gradle.api.Project
Expand All @@ -11,7 +10,8 @@ import org.gradle.api.provider.Property
@SuppressWarnings("UnstableApiUsage")
@CompileStatic
@Slf4j
@ToString(includeFields = true, includeNames = true, includePackage = false)
//TODO: Re-enable once https://github.com/gradle/gradle/issues/11466 is fixed in Gradle
//@ToString(includeFields = true, includeNames = true, includePackage = false)
class NexusStagingExtension {

String serverUrl
Expand Down

0 comments on commit eeb1d82

Please sign in to comment.