From 8204c2f65d11f1d4b862286d59f7081178a10d97 Mon Sep 17 00:00:00 2001 From: Mark Perry Date: Sat, 12 Sep 2015 13:52:30 +1000 Subject: #16: Fixing errors with changes for using the plugin portal --- README.adoc | 4 ++-- build.gradle | 28 ++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.adoc b/README.adoc index 09139e4..4af9678 100644 --- a/README.adoc +++ b/README.adoc @@ -3,10 +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. -= How to refer to on a gradle build += Usage 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-pgitlugin/ . \ No newline at end of file +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 3462bc7..5991631 100644 --- a/build.gradle +++ b/build.gradle @@ -7,10 +7,11 @@ sourceCompatibility = 1.7 targetCompatibility = 1.7 ext { - baseVersion = "0.4.2" + baseVersion = "0.5" isSnapshot = true snapshotAppendix = "-SNAPSHOT" projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "") + projectGroup = "org.frege-lang" fregeBaseVersion = "3.23.288" fregeClassifier = "-gaa3af0c" @@ -23,14 +24,26 @@ ext { 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' + def keyName = "gradle.publish.key" + def key = props.getProperty(keyName) + if (key == null) { + println "No key named $keyName found in ${propfile.absolutePath}" + } + def secretName = "gradle.publish.secret" + def secret = props.getProperty(secretName) + if (secret == null) { + println "No key named $secretName found in ${propfile.absolutePath}" + } + if (key != null && secret != null) { + 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 -group = 'org.frege-lang' +group = projectGroup repositories { mavenLocal() @@ -38,14 +51,13 @@ repositories { } dependencies { - compile "org.frege-lang:frege:$fregeVersion" - compile "org.frege-lang:frege-repl-core:1.2" - compile "org.frege-lang:frege-native-gen:1.3" + compile "$projectGroup:frege:$fregeVersion" + compile "$projectGroup:frege-repl-core:1.2" + compile "$projectGroup:frege-native-gen:1.3" compile gradleApi() compile localGroovy() } - // using the publishing plugin buildscript { -- cgit