Skip to content
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

Publish the Gradle plugin to the Gradle Plugin Portal #309

Open
fladulima opened this issue Jan 28, 2022 · 6 comments
Open

Publish the Gradle plugin to the Gradle Plugin Portal #309

fladulima opened this issue Jan 28, 2022 · 6 comments

Comments

@fladulima
Copy link

fladulima commented Jan 28, 2022

I am trying to use the gradle plugin using plugins DSL, but the version 0.29 can't be found in gradle plugin repository.

plugins {
    id 'org.springframework.boot' version '2.6.2'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java-library'
    id 'io.spring.javaformat' version '0.0.29'
}

Thanks

@wilkinsona
Copy link
Contributor

Publishing the Gradle plugin to the Portal was removed as part of 9a485f8. Unfortunately, following Bintray's sunset there's no automated way in which a Maven-based build can publish a plugin to the Portal. Building this project with Gradle isn't easy due to its reliance on Tycho.

The README describes how to obtain the plugin from Maven Central. That's the recommended approach at this time.

@wilkinsona wilkinsona changed the title Publish the gradle plugin 0.29 to the gradle Plugin Portal. Publish the Gradle plugin to the Gradle Plugin Portal Jan 29, 2022
@wilkinsona wilkinsona added this to the 0.0.x milestone Jan 29, 2022
@fladulima
Copy link
Author

thanks for the info.

I just found out that I can also provide a resolutionStrategy in settings.gradle.

build.gradle

plugins {
    id 'io.spring.javaformat'
}

settings.gradle

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.name == 'javaformat') {
                useModule('io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.29')
            }
        }
    }
}

@philwebb
Copy link
Contributor

philwebb commented Feb 2, 2022

I'd like to keep this open in case we can publish directly without needing Bintray.

@SayakMukhopadhyay
Copy link

@philwebb Seems like this was fixed in #321. It works for me.

@philwebb
Copy link
Contributor

philwebb commented Apr 5, 2023

Thanks @SayakMukhopadhyay, I think #321 improved things but we've still got an old version at https://plugins.gradle.org/plugin/io.spring.javaformat so there's probably some value in leaving this open.

@philwebb
Copy link
Contributor

When we fix this we should also look at updating the docs (see #394).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants