Skip to content

Commit

Permalink
Merge pull request #22 from rivancic/feature/gradle-plugin-portal
Browse files Browse the repository at this point in the history
GUC-92 Add link to published plugin
  • Loading branch information
rivancic committed Apr 17, 2022
2 parents 0bef2b0 + 157a6b0 commit 8ddf160
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .idea/gradle.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
filesPluginVersion=0.1.0
# ---- Plugin Repositories ---------------------------------------------------------------------------------------------
useGradlePluginPortal=true
useMavenLocalCache=false
useMavenPrivateRepo=false
# ----------------------------------------------------------------------------------------------------------------------

# ---- Sorting Plugin Version ------------------------------------------------------------------------------------------
filesPluginVersion=1.0.0
# ----------------------------------------------------------------------------------------------------------------------

# ---- Sorting Configuration -------------------------------------------------------------------------------------------
tasks.files.folder=files
# sortType = [alphabet, date, extension]
tasks.files.sortType=alphabet
tasks.files.sortType=alphabet
# ----------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,46 @@
*/
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
maven {
url = "http://localhost:8080/repository/internal"
name = "mavenArchivaPrivate"
allowInsecureProtocol = true
credentials {
username = "$privateArchivaUser"
password = "$privateArchivaPassword"
logger.info("---- settings.gradle Plugin Repositories ------------------------------------------------------------")
def gradlePluginPortalFlag = false
try {
gradlePluginPortalFlag = "${useGradlePluginPortal}"
} catch(Exception e) {
logger.info("\"useGradlePluginPortal\" variable isn't set in gradle.properties")
}
if(gradlePluginPortalFlag == "true") {
gradlePluginPortal()
logger.info("Using Gradle Plugin Portal")
}

def useMavenLocalFlag = false
try {
useMavenLocalFlag = "${useMavenLocalCache}"
} catch(Exception e) {
logger.info("\"useMavenLocalCache\" variable isn't set in gradle.properties")
}
if(useMavenLocalFlag == "true") {
mavenLocal()
logger.info("Using Maven Local Cache")
}

def useMavenPrivateFlag = false
try {
useMavenPrivateFlag = "${useMavenPrivateRepo}"
} catch(Exception e) {
logger.info("\"useMavenPrivateRepo\" variable isn't set in gradle.properties")
}
if(useMavenPrivateFlag == "true") {
maven {
url = "http://localhost:8080/repository/internal"
name = "mavenArchivaPrivate"
allowInsecureProtocol = true
credentials {
username = "$privateArchivaUser"
password = "$privateArchivaPassword"
}
}
logger.info("Using Maven Private Repository at http://localhost:8080/repository/internal")
}
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions binary-plugin/binary-plugin-gradle-plugin-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project with the configuration that can publish binary Gradle plugin to Gradle P
In order to prepare the project for publishing it to Gradle Plugin Portal you have to make sure you add following configuration:

1) Make sure you have a Gradle Plugin Portal account, which can be set up at a [login/registration page](https://plugins.gradle.org/user/login), and create key and its secret for the API access.
Alternatively to creation of API keys manually you can later use gradle login task that will guide you through the process of setting up keys.

2) Save Gradle Plugin Portal key and secret to `~/.gradle/gradle.properties`:

Expand Down Expand Up @@ -43,13 +44,18 @@ gradlePlugin {
```groovy
pluginBundle {
website = 'https://github.com/rivancic/gradle'
vcsUrl = 'https://github.com/rivancic/gradle/tree/master/binary-plugin'
vcsUrl = 'https://github.com/rivancic/gradle' // has to point to the root of the repository
tags = ['files', 'sorting']
}
```

With `publishPlugins` task you can publish your plugin to Gradle Plugin Portal. As describe in the tutorial for publishing
for the first time you might wait a day or two that the plugin will be approved.
for the first time you might wait a day or two that the plugin will be approved. In case your submission is not complete you
will receive an email with detailed explanation of what additional steps are necessary.

## Published Version

Plugin is being published on Gradle Plugin Portal as [com.rivancic.files-plugin](https://plugins.gradle.org/plugin/com.rivancic.files-plugin)

## Resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gradlePlugin {
*/
pluginBundle {
website = 'https://github.com/rivancic/gradle'
vcsUrl = 'https://github.com/rivancic/gradle/tree/master/binary-plugin'
vcsUrl = 'https://github.com/rivancic/gradle'
tags = ['files', 'sorting']
}

Expand Down

0 comments on commit 8ddf160

Please sign in to comment.