hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1572605 - in /httpcomponents/httpclient-android/trunk: build.gradle buildSrc/src/main/groovy/HC.groovy
Date Thu, 27 Feb 2014 14:49:34 GMT
Author: olegk
Date: Thu Feb 27 14:49:34 2014
New Revision: 1572605

URL: http://svn.apache.org/r1572605
Log:
Updated android branch creation logic

Modified:
    httpcomponents/httpclient-android/trunk/build.gradle
    httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy

Modified: httpcomponents/httpclient-android/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/build.gradle?rev=1572605&r1=1572604&r2=1572605&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/build.gradle (original)
+++ httpcomponents/httpclient-android/trunk/build.gradle Thu Feb 27 14:49:34 2014
@@ -36,7 +36,7 @@ dependencies {
     hcApi 'org.apache.httpcomponents:httpclient:4.0-beta1'
 }
 
-String branchName = 'test-branch'
+String branchName = "${HTTPCLIENT_VERSION}-android"
 URI branchUri = new URI("${REPO_ROOT}/httpclient-android/branches/${branchName}")
 File localDir = file("$buildDir/${branchName}")
 File srcRoot = new File(localDir, 'src/main/java')

Modified: httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy?rev=1572605&r1=1572604&r2=1572605&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy (original)
+++ httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy Thu Feb 27
14:49:34 2014
@@ -39,6 +39,10 @@ class HC {
 
     static String LINE_DELIM = System.getProperty("line.separator")
 
+    /**
+     * This method creates a branch by making 'cheap' copies of packages
+     * from HttpCore and HttpClient release tags
+     */
     static void createAndroidBranch(
             URI repoRoot,
             String coreVersion,
@@ -58,9 +62,15 @@ class HC {
                     "httpclient-android/branches/${branchName}/src", null, -1)
             commitEditor.addDir(
                     "httpclient-android/branches/${branchName}/src/main", null, -1)
+
+            // Copy HttpCore packages. This can be done in one go
+
             commitEditor.addDir(
                     "httpclient-android/branches/${branchName}/src/main/java",
                     "httpcore/tags/${coreVersion}/httpcore/src/main/java/", -1)
+
+            // Copy HttpClient packages. This needs to be done package by package
+
             commitEditor.openDir(
                     "httpclient-android/branches/${branchName}/src/main/java/org", -1)
             commitEditor.openDir(
@@ -84,13 +94,56 @@ class HC {
                 commitEditor.closeDir()
             }
             commitEditor.closeDir()
-
             commitEditor.closeDir()
             commitEditor.closeDir()
             commitEditor.closeDir()
+            // Done copying HttpClient
+
             commitEditor.closeDir()
+            // Done copying HttpCore
+
             commitEditor.closeDir()
             commitEditor.closeDir()
+            // Done copying src
+
+            // Copy README, NOTICE and LICENSE from trunk
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/README.txt",
+                    "httpclient-android/trunk/README.txt", -1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/README.txt", null)
+
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/LICENSE.txt",
+                    "httpclient-android/trunk/LICENSE.txt", -1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/LICENSE.txt", null)
+
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/NOTICE.txt",
+                    "httpclient-android/trunk/NOTICE.txt", -1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/NOTICE.txt", null)
+            // Done copying text files
+
+            // Copy build scripts
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/build.gradle",
+                    "httpclient-android/trunk/src/main/resources/build.gradle", -1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/build.gradle", null)
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/gradle.properties",
+                    "httpclient-android/trunk/src/main/resources/gradle.properties.template",
-1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/gradle.properties", null)
+            commitEditor.addFile(
+                    "httpclient-android/branches/${branchName}/settings.gradle",
+                    "httpclient-android/trunk/src/main/resources/settings.gradle", -1)
+            commitEditor.closeFile(
+                    "httpclient-android/branches/${branchName}/settings.gradle", null)
+            // Done copying build scripts
+
             commitEditor.closeDir()
             commitEditor.closeDir()
             commitEditor.closeEdit()



Mime
View raw message