diff --git a/.idea/compiler.xml b/.idea/compiler.xml index d2bf252..de47df0 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -2,9 +2,12 @@ + + + diff --git a/.idea/gradle.iml b/.idea/gradle.iml index 72d4f9f..6a9ace9 100644 --- a/.idea/gradle.iml +++ b/.idea/gradle.iml @@ -1,2 +1,8 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/binary-plugin/binary-plugin-assignment-test-project/gradle.properties b/binary-plugin/binary-plugin-assignment-test-project/gradle.properties index 4cf8b91..1b19381 100644 --- a/binary-plugin/binary-plugin-assignment-test-project/gradle.properties +++ b/binary-plugin/binary-plugin-assignment-test-project/gradle.properties @@ -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 \ No newline at end of file +tasks.files.sortType=alphabet +# ---------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/binary-plugin/binary-plugin-assignment-test-project/settings.gradle b/binary-plugin/binary-plugin-assignment-test-project/settings.gradle index 907188e..bd282a4 100644 --- a/binary-plugin/binary-plugin-assignment-test-project/settings.gradle +++ b/binary-plugin/binary-plugin-assignment-test-project/settings.gradle @@ -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") } } } diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/binary-plugin-gradle-plugin-portal.iml b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/binary-plugin-gradle-plugin-portal.iml new file mode 100644 index 0000000..b9428cd --- /dev/null +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/binary-plugin-gradle-plugin-portal.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/compiler.xml b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/compiler.xml index b73660a..61a9130 100644 --- a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/compiler.xml +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/gradle.xml b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/gradle.xml index 611e7c8..383b9a6 100644 --- a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/gradle.xml +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/gradle.xml @@ -4,8 +4,11 @@ \ No newline at end of file diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/modules/binary-plugin-gradle-plugin-portal.main.iml b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/modules/binary-plugin-gradle-plugin-portal.main.iml new file mode 100644 index 0000000..4a4ce55 --- /dev/null +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/.idea/modules/binary-plugin-gradle-plugin-portal.main.iml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/README.md b/binary-plugin/binary-plugin-gradle-plugin-portal/README.md index bd8a207..3129741 100644 --- a/binary-plugin/binary-plugin-gradle-plugin-portal/README.md +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/README.md @@ -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`: @@ -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 diff --git a/binary-plugin/binary-plugin-gradle-plugin-portal/build.gradle b/binary-plugin/binary-plugin-gradle-plugin-portal/build.gradle index 7442cdf..1f886d9 100644 --- a/binary-plugin/binary-plugin-gradle-plugin-portal/build.gradle +++ b/binary-plugin/binary-plugin-gradle-plugin-portal/build.gradle @@ -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'] }