[rest-gradle-plugin] 29/83: Upgrading to Gradle 2.0

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed Oct 25 15:59:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository rest-gradle-plugin.

commit eeb31713d28a4a91648e6f20669680ee129d8d50
Author: noamt <noam at 10ne.org>
Date:   Sun Aug 10 13:37:16 2014 +0300

    Upgrading to Gradle 2.0
---
 build.gradle                             |  13 ++--
 gradle/Bintray.gradle                    | 117 -------------------------------
 gradle/wrapper/gradle-wrapper.jar        | Bin 49875 -> 51017 bytes
 gradle/wrapper/gradle-wrapper.properties |   4 +-
 4 files changed, 7 insertions(+), 127 deletions(-)

diff --git a/build.gradle b/build.gradle
index 01ea594..79baadb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,25 +17,22 @@
 apply plugin: 'groovy'
 apply plugin: 'idea'
 apply plugin: 'maven'
+apply plugin: 'project-reports'
 
 group = 'org._10ne.gradle'
 
-buildscript {
-    apply from: 'gradle/Bintray.gradle'
-}
-
 repositories {
-    bintray.jcenter()
+    jcenter()
 }
 
 dependencies {
     compile gradleApi()
-    compile 'org.codehaus.groovy:groovy-all:1.8.9'
+    compile 'org.codehaus.groovy:groovy-all:2.3.3'
     compile('org.codehaus.groovy.modules.http-builder:http-builder:0.6') {
         exclude group: 'org.codehaus.groovy', module: 'groovy-all'
         exclude group: 'org.codehaus.groovy', module: 'groovy'
     }
-    testCompile 'org.spockframework:spock-core:0.7-groovy-1.8'
+    testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
     testCompile 'cglib:cglib-nodep:2.2.2'
 }
 
@@ -49,7 +46,7 @@ artifacts {
 }
 
 task wrapper(type: Wrapper, description: 'Gradle Wrapper task') {
-    gradleVersion = '1.6'
+    gradleVersion = '2.0'
 }
 
 configure(install.repositories.mavenInstaller) {
diff --git a/gradle/Bintray.gradle b/gradle/Bintray.gradle
deleted file mode 100644
index 11021bd..0000000
--- a/gradle/Bintray.gradle
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2013 David M. Carr
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and limitations under the License.
- */
-
-import org.gradle.api.artifacts.repositories.MavenArtifactRepository
-import org.gradle.api.internal.Actions
-import org.gradle.api.internal.ClosureBackedAction
-
-class BintrayRepositoriesExtension {
-    static final String REPO_OWNER_ARG_NAME = 'repoOwner'
-    static final String REPO_NAME_ARG_NAME = 'repoName'
-    static final String URL_ARG_NAME = 'url'
-    static final String NAME_ARG_NAME = 'name'
-
-    Project project
-    RepositoryHandler repositories
-
-    BintrayRepositoriesExtension(Project project, RepositoryHandler repositories) {
-        this.project = project
-        this.repositories = repositories
-    }
-
-    MavenArtifactRepository jcenter() {
-        return repositories.maven { MavenArtifactRepository repository ->
-            repository.name = 'BintrayJCenter'
-            repository.url = 'http://jcenter.bintray.com'
-        }
-    }
-
-    MavenArtifactRepository repo(Map<String, ?> args) {
-        return repo(args, Actions.doNothing())
-    }
-
-    @SuppressWarnings("unchecked")
-    MavenArtifactRepository repo(Map<String, ?> args, Closure closure) {
-        return repo(args, new ClosureBackedAction(closure))
-    }
-
-    MavenArtifactRepository repo(Map<String, ?> args, Action<? super MavenArtifactRepository> action) {
-        Map<String, Object> modifiedArgs = new HashMap<String, Object>(args)
-        String repoOwner = pullRequiredArg(modifiedArgs, REPO_OWNER_ARG_NAME)
-        String repoName = pullRequiredArg(modifiedArgs, REPO_NAME_ARG_NAME)
-        if (!modifiedArgs.containsKey(URL_ARG_NAME)) {
-            modifiedArgs.put(URL_ARG_NAME, determineRepositoryUrl(repoOwner, repoName))
-        }
-        if (!modifiedArgs.containsKey(NAME_ARG_NAME)) {
-            modifiedArgs.put(NAME_ARG_NAME, determineRepositoryName(repoOwner, repoName))
-        }
-        return repositories.maven { MavenArtifactRepository repository ->
-            repository.credentials.conventionMapping.username = {
-                if (!project.hasProperty('bintrayUserName')) {
-                    throw new InvalidUserDataException("Bintray repositories require authentication.  Please configure the credentials either directly in the repository definition, or with 'bintrayUserName' and 'bintrayApiKey' properties in your gradle.properties.file.")
-                }
-                return project.bintrayUserName
-            }
-            repository.credentials.conventionMapping.password = {
-                if (!project.hasProperty('bintrayApiKey')) {
-                    throw new InvalidUserDataException("Bintray repositories require authentication.  Please configure the credentials either directly in the repository definition, or with 'bintrayUserName' and 'bintrayApiKey' properties in your gradle.properties.file.")
-                }
-                project.bintrayApiKey
-            }
-            ConfigureUtil.configureByMap(modifiedArgs, repository)
-            action.execute(repository)
-        }
-    }
-
-    String pullRequiredArg(Map<String, ?> args, String argName) {
-        Object objectValue = args.remove(argName)
-        if (objectValue == null) throw new InvalidUserDataException("'${argName}' must be specified")
-        String stringValue = objectValue.toString()
-        if (stringValue.isEmpty()) throw new InvalidUserDataException("'${argName}' must be non-empty")
-        return stringValue
-    }
-
-    String determineRepositoryName(String repoOwner, String repoName) {
-        return "Bintray${toTitleCase(separatorsToCaps(repoOwner))}${toTitleCase(separatorsToCaps(repoName))}"
-    }
-
-    String determineRepositoryUrl(String repoOwner, String repoName) {
-        return "http://dl.bintray.com/content/${repoOwner}/${repoName}"
-    }
-
-    String separatorsToCaps(String string) {
-        StringBuilder stringBuilder = new StringBuilder(string)
-        int pos = 0
-        while (pos < stringBuilder.length()) {
-            char curChar = stringBuilder.charAt(pos)
-            if (curChar == '-') {
-                if (pos + 1 < stringBuilder.length()) {
-                    stringBuilder.setCharAt(pos + 1, Character.toUpperCase(stringBuilder.charAt(pos + 1)))
-                }
-                stringBuilder.deleteCharAt(pos)
-            }
-            pos++
-        }
-        return stringBuilder.toString()
-    }
-
-    String toTitleCase(String string) {
-        if (string.isEmpty()) return string
-        StringBuilder stringBuilder = new StringBuilder(string)
-        stringBuilder.setCharAt(0, Character.toUpperCase(stringBuilder.charAt(0)))
-        return stringBuilder.toString()
-    }
-}
-
-project.buildscript.repositories.extensions.create('bintray', BintrayRepositoriesExtension, project, project.buildscript.repositories)
-project.repositories.extensions.create('bintray', BintrayRepositoriesExtension, project, project.repositories)
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index a7634b0..b761216 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 1c5e8b4..06071c9 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Jun 25 17:58:12 IDT 2013
+#Sun Aug 10 13:28:21 IDT 2014
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-all.zip

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/rest-gradle-plugin.git



More information about the pkg-java-commits mailing list