From 33c684a29edce712a4a787471ad6a1721ff73379 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Sun, 30 Aug 2015 18:04:42 +0200 Subject: trying to publishPlugins to the gradle plugin portal. Currently fails because of signing issues. --- build.gradle | 34 ++++++++++++++++++++++ .../META-INF/gradle-plugins/frege.properties | 1 - .../gradle-plugins/org.frege-lang.properties | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) delete mode 100644 src/main/resources/META-INF/gradle-plugins/frege.properties create mode 100644 src/main/resources/META-INF/gradle-plugins/org.frege-lang.properties diff --git a/build.gradle b/build.gradle index 1043f9c..cdb810b 100644 --- a/build.gradle +++ b/build.gradle @@ -55,3 +55,37 @@ nexusStaging { stagingProfileId = "a622b6773bea07" } +// First, apply the publishing plugin +buildscript { + repositories { + maven { + url "https://plugins.gradle.org/m2/" + } + } + dependencies { + classpath "com.gradle.publish:plugin-publish-plugin:0.9.1" + } +} + +// Details on how to publish to the gradle plugin portal +// Go to http://plugins.gradle.org, get yourself a publishing key +// and add it under ~/.gradle/gradle.properties +// For publishing, run the task publishPlugins. + +apply plugin: "com.gradle.plugin-publish" + +// The configuration example below shows the minimum required properties +// configured to publish your plugin to the plugin portal +pluginBundle { + website = 'https://github.com/Frege/frege-gradle-plugin' + vcsUrl = 'https://github.com/Frege/frege-gradle-plugin' + description = 'Enabling Frege for compilation, testing, documentation, and supporting tools.' + tags = ['frege', 'haskell', 'java'] + + plugins { + fregePlugin { + id = 'org.frege-lang' + displayName = 'Frege plugin' + } + } +} diff --git a/src/main/resources/META-INF/gradle-plugins/frege.properties b/src/main/resources/META-INF/gradle-plugins/frege.properties deleted file mode 100644 index 25a44ac..0000000 --- a/src/main/resources/META-INF/gradle-plugins/frege.properties +++ /dev/null @@ -1 +0,0 @@ -implementation-class=frege.gradle.FregePlugin diff --git a/src/main/resources/META-INF/gradle-plugins/org.frege-lang.properties b/src/main/resources/META-INF/gradle-plugins/org.frege-lang.properties new file mode 100644 index 0000000..25a44ac --- /dev/null +++ b/src/main/resources/META-INF/gradle-plugins/org.frege-lang.properties @@ -0,0 +1 @@ +implementation-class=frege.gradle.FregePlugin -- cgit From c8fbd2d175d11193b70a8da79ee399da5849104f Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Fri, 4 Sep 2015 14:02:30 +0200 Subject: Remove dependencies to sonatype and directly publish to the gradle plugin portal. Upgrade to frege version 3.23, --- README.adoc | 30 +--------- build.gradle | 46 ++++++---------- gradle.properties | 8 +-- gradle/sonatype.gradle | 95 -------------------------------- gradle/wrapper/gradle-wrapper.properties | 4 +- 5 files changed, 22 insertions(+), 161 deletions(-) delete mode 100644 gradle/sonatype.gradle diff --git a/README.adoc b/README.adoc index e8f3b81..c635ae0 100644 --- a/README.adoc +++ b/README.adoc @@ -3,34 +3,10 @@ This is the official Gradle plugin to compile Frege projects (https://github.com/Frege/frege). See the example project, https://github.com/mperry/frege-gradle-example, for how to use this plugin. -The latest release is 0.4.1. Note that the 0.3 experimented with _github releases_ and http://jitpack.io. There seems to be access issues to the 0.3 release, please use the 0.4-SNAPSHOT snapshot release. += How to refer to on a gradle build -[source, groovy] ----- -buildscript { // make the frege plugin available in our build - repositories { - mavenLocal() // if you have the plugin installed locally, this is enough - maven { - url "https://oss.sonatype.org/content/groups/public" - } - } - dependencies { - classpath 'org.frege-lang:frege-gradle-plugin:0.4.1' - } -} ----- - - -To locally install this plugin use - - gradlew clean install - - -NOTE: There is no need to install gradle or anything else beside a recent Java version. - It is all self-installing. +See https://plugins.gradle.org/plugin/org.frege-lang = Continuous Integration -The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin/ . - -The snapshot builds are automatically deployed to Sonatype at https://oss.sonatype.org/content/groups/public/org/frege-lang/frege-gradle-plugin/. +The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin/ . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 174ccb4..bcf47c5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,4 @@ - -buildscript { - repositories { - mavenLocal() - mavenCentral() - } - dependencies { - classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" - classpath "com.github.mperry:frege-gradle-release-plugin:0.1" - } -} - apply plugin: "groovy" -apply plugin: "maven" -apply plugin: "signing" -apply plugin: 'io.codearte.nexus-staging' -apply plugin: 'frege-release' defaultTasks "build" @@ -30,21 +14,26 @@ ext { fregeBaseVersion = "3.23.288" fregeClassifier = "-gaa3af0c" fregeVersion = "$fregeBaseVersion$fregeClassifier" + + // work around https://issues.gradle.org/browse/GRADLE-3281 + def home = new File(System.getProperty("user.home")) + def propfile = new File(home, ".gradle/gradle.properties") + props = new Properties() + propfile.withReader { + props.load(it) + System.setProperty "gradle.publish.key" , props.'gradle.publish.key' + System.setProperty "gradle.publish.secret", props.'gradle.publish.secret' + } } -apply from: "gradle/sonatype.gradle" +version = projectVersion +group = 'org.frege-lang' repositories { mavenLocal() - maven { - url = sonatypeRepositoryUrl - } mavenCentral() } -version = projectVersion -group = groupName - dependencies { compile "org.frege-lang:frege:$fregeVersion" compile "org.frege-lang:frege-repl-core:1.2" @@ -53,12 +42,9 @@ dependencies { compile localGroovy() } -nexusStaging { - packageGroup = groupName - stagingProfileId = "a622b6773bea07" -} -// First, apply the publishing plugin +// using the publishing plugin + buildscript { repositories { maven { @@ -72,7 +58,7 @@ buildscript { // Details on how to publish to the gradle plugin portal // Go to http://plugins.gradle.org, get yourself a publishing key -// and add it under ~/.gradle/gradle.properties +// and add it to ~/.gradle/gradle.properties as // For publishing, run the task publishPlugins. apply plugin: "com.gradle.plugin-publish" @@ -81,7 +67,7 @@ apply plugin: "com.gradle.plugin-publish" // configured to publish your plugin to the plugin portal pluginBundle { website = 'https://github.com/Frege/frege-gradle-plugin' - vcsUrl = 'https://github.com/Frege/frege-gradle-plugin' + vcsUrl = 'https://github.com/Frege/frege-gradle-plugin' description = 'Enabling Frege for compilation, testing, documentation, and supporting tools.' tags = ['frege', 'haskell', 'java'] diff --git a/gradle.properties b/gradle.properties index 6a37d97..f60ca17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1 @@ - -signingEnabled = false -sonatypeUsername = incorrectUsername -sonatypePassword = incorrectPassword - -nexusUsername = incorrectUsername -nexusPassword = incorrectPassword +#currently not needed \ No newline at end of file diff --git a/gradle/sonatype.gradle b/gradle/sonatype.gradle deleted file mode 100644 index f0cf569..0000000 --- a/gradle/sonatype.gradle +++ /dev/null @@ -1,95 +0,0 @@ - -ext { - - sonatypeBaseUrl = "https://oss.sonatype.org" - sonatypeSnapshotUrl = "$sonatypeBaseUrl/content/repositories/snapshots/" - sonatypeRepositoryUrl = "$sonatypeBaseUrl/content/groups/public" - sonatypeReleaseUrl = "$sonatypeBaseUrl/service/local/staging/deploy/maven2/" - sonatypeUploadUrl = isSnapshot ? sonatypeSnapshotUrl : sonatypeReleaseUrl - - projectUrl = "https://github.com/Frege/frege-gradle-plugin" - projectName = "Frege Gradle Plugin" - pomProjectName = projectName - baseJarName = "gradle-frege-plugin" - - groupName = "org.frege-lang" - scmUrl = "git://github.com/Frege/frege-gradle-plugin.git" - scmGitFile = "scm:git@github.com:Frege/frege-gradle-plugin.git" - projectDescription = "Frege Gradle plugin" - - licenseName = "BSD 3-clause license" - licenseUrl = 'http://opensource.org/licenses/BSD-3-Clause' - - organisation = groupName - - primaryEmail = "frege-programming-language@googlegroups.com" - -} - -Boolean doSigning() { - signingEnabled.trim() == "true" -} - -task javadocJar(type: Jar, dependsOn: "javadoc") { - classifier = 'javadoc' - from "build/docs/javadoc" -} - -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} - -artifacts { - archives jar - archives javadocJar - archives sourcesJar -} - -signing { - required { doSigning() } - sign configurations.archives -} - -uploadArchives { - enabled = true - repositories { - mavenDeployer { - if (doSigning()) { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - } - - repository(url: sonatypeUploadUrl) { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } - pom { - groupId = groupName - project { - name pomProjectName - packaging 'jar' - description projectDescription - url projectUrl - organization { - name pomProjectName - url projectUrl - } - scm { - url scmUrl - } - licenses { - license { - name licenseName - url licenseUrl - distribution 'repo' - } - } - developers { - developer { - email primaryEmail - } - } - } - } - } - } -} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 330b106..ac404a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Aug 30 17:39:41 CEST 2015 +#Thu Sep 03 23:57:28 CEST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip -- cgit From eef4301d5439f51a418d27a9509e4e3812e2f348 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Fri, 4 Sep 2015 15:30:17 +0200 Subject: travis has no gradle properties under home dir, so make that optional --- README.adoc | 2 +- build.gradle | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index c635ae0..09139e4 100644 --- a/README.adoc +++ b/README.adoc @@ -9,4 +9,4 @@ See https://plugins.gradle.org/plugin/org.frege-lang = Continuous Integration -The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin/ . \ No newline at end of file +The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-pgitlugin/ . \ No newline at end of file diff --git a/build.gradle b/build.gradle index bcf47c5..0e5f6ad 100644 --- a/build.gradle +++ b/build.gradle @@ -18,12 +18,14 @@ ext { // work around https://issues.gradle.org/browse/GRADLE-3281 def home = new File(System.getProperty("user.home")) def propfile = new File(home, ".gradle/gradle.properties") - props = new Properties() - propfile.withReader { - props.load(it) - System.setProperty "gradle.publish.key" , props.'gradle.publish.key' - System.setProperty "gradle.publish.secret", props.'gradle.publish.secret' - } + if (propfile.exists()) { + props = new Properties() + propfile.withReader { + props.load(it) + System.setProperty "gradle.publish.key", props.'gradle.publish.key' + System.setProperty "gradle.publish.secret", props.'gradle.publish.secret' + } + } else println "cannot find '$propfile.absolutePath'" } version = projectVersion -- cgit From 3f94faced8204a7daade2c009a585bd737b22f31 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Fri, 4 Sep 2015 18:03:14 +0200 Subject: re-apply maven plugin to allow local installation with `gradlew install` --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 0e5f6ad..3462bc7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ apply plugin: "groovy" +apply plugin: "maven" defaultTasks "build" -- cgit