hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1548936 - in /httpcomponents/httpclient-android/trunk: ./ buildSrc/ buildSrc/src/main/groovy/ src/main/groovy/
Date Sat, 07 Dec 2013 15:59:30 GMT
Author: olegk
Date: Sat Dec  7 15:59:30 2013
New Revision: 1548936

URL: http://svn.apache.org/r1548936
Log:
Restored buildSrc; added tasks to checkout and rewrite source code

Added:
    httpcomponents/httpclient-android/trunk/buildSrc/build.gradle
      - copied, changed from r1548935, httpcomponents/httpclient-android/trunk/build.gradle
    httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/GetAllScanner.groovy
    httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy
      - copied, changed from r1548935, httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy
    httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/Svn.groovy
      - copied, changed from r1548935, httpcomponents/httpclient-android/trunk/src/main/groovy/Svn.groovy
    httpcomponents/httpclient-android/trunk/gradle.properties   (with props)
Removed:
    httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy
    httpcomponents/httpclient-android/trunk/src/main/groovy/Svn.groovy
Modified:
    httpcomponents/httpclient-android/trunk/build.gradle

Modified: httpcomponents/httpclient-android/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/build.gradle?rev=1548936&r1=1548935&r2=1548936&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/build.gradle (original)
+++ httpcomponents/httpclient-android/trunk/build.gradle Sat Dec  7 15:59:30 2013
@@ -1,19 +1,62 @@
-apply plugin: 'groovy'
-
 repositories {
     mavenCentral()
 }
 
-version = '0.1-SNAPSHOT'
-
-sourceCompatibility = '1.6'
+configurations.create('hcApi')
 
 dependencies {
-    compile 'org.codehaus.groovy:groovy:2.2.0'
-    compile 'org.tmatesoft.svnkit:svnkit:1.7.8'
-    compile 'org.tmatesoft.svnkit:svnkit-cli:1.7.8'
-    compile 'org.reflections:reflections:0.9.9-RC1'
-    runtime 'javax.servlet:servlet-api:2.5'
-    runtime 'org.slf4j:slf4j-nop:1.7.5'
+    hcApi 'org.apache.httpcomponents:httpcore:4.0-beta3'
+    hcApi 'org.apache.httpcomponents:httpclient:4.0-beta1'
+}
+
+String branchName = 'test-branch'
+URI branchUri = new URI("${REPO_ROOT}/httpclient-android/branches/${branchName}")
+File localDir = file("$buildDir/${branchName}")
+
+task createSvnBranch {
+    group = 'SVN'
+    description = "Creates Android specific branch of HttpClient ${HTTPCLIENT_VERSION}"
+    onlyIf {
+        !localDir.exists()
+    }
+    doLast {
+        println "Creating Android port branch based on HttpCore ${HTTPCORE_VERSION} and HttpClient
${HTTPCLIENT_VERSION}"
+        HC.createAndroidBranch(
+                new URI("${REPO_ROOT}"),
+                "${HTTPCORE_VERSION}",
+                "${HTTPCLIENT_VERSION}",
+                branchName)
+    }
 }
 
+task checkout(dependsOn: createSvnBranch) {
+    group = 'SVN'
+    description = "Checks out Android specific branch from ${branchUri}"
+    onlyIf {
+        !localDir.exists()
+    }
+    doLast {
+        Svn.checkout(branchUri, localDir)
+    }
+}
+
+task rewrite(dependsOn: checkout) {
+    doLast {
+        def jars = configurations.hcApi.resolvedConfiguration.resolvedArtifacts.collect {
ResolvedArtifact artifact ->
+            artifact.file
+        }
+        def allClasses = HC.getClassesFromJars(jars)
+
+        File srcRoot = new File(localDir, 'src/main/java')
+        allClasses.each { Class clazz ->
+            if (!clazz.memberClass && !clazz.anonymousClass) {
+                String name = clazz.canonicalName.replaceAll('\\.', '/')
+                File file = new File(srcRoot, name + '.java')
+                if (file.exists()) {
+                    println file
+                }
+            }
+        }
+    }
+
+}

Copied: httpcomponents/httpclient-android/trunk/buildSrc/build.gradle (from r1548935, httpcomponents/httpclient-android/trunk/build.gradle)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/buildSrc/build.gradle?p2=httpcomponents/httpclient-android/trunk/buildSrc/build.gradle&p1=httpcomponents/httpclient-android/trunk/build.gradle&r1=1548935&r2=1548936&rev=1548936&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/build.gradle (original)
+++ httpcomponents/httpclient-android/trunk/buildSrc/build.gradle Sat Dec  7 15:59:30 2013
@@ -4,16 +4,12 @@ repositories {
     mavenCentral()
 }
 
-version = '0.1-SNAPSHOT'
-
-sourceCompatibility = '1.6'
-
 dependencies {
-    compile 'org.codehaus.groovy:groovy:2.2.0'
+    compile gradleApi()
+    compile localGroovy()
     compile 'org.tmatesoft.svnkit:svnkit:1.7.8'
     compile 'org.tmatesoft.svnkit:svnkit-cli:1.7.8'
     compile 'org.reflections:reflections:0.9.9-RC1'
     runtime 'javax.servlet:servlet-api:2.5'
     runtime 'org.slf4j:slf4j-nop:1.7.5'
 }
-

Added: httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/GetAllScanner.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/GetAllScanner.groovy?rev=1548936&view=auto
==============================================================================
--- httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/GetAllScanner.groovy
(added)
+++ httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/GetAllScanner.groovy
Sat Dec  7 15:59:30 2013
@@ -0,0 +1,13 @@
+
+
+import org.reflections.scanners.AbstractScanner
+
+class GetAllScanner extends AbstractScanner {
+
+    @Override
+    public void scan(final Object cls) {
+        String className = getMetadataAdapter().getClassName(cls)
+        getStore().put(className, className)
+    }
+
+}

Copied: httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy (from r1548935,
httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy?p2=httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy&p1=httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy&r1=1548935&r2=1548936&rev=1548936&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/src/main/groovy/HC.groovy (original)
+++ httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/HC.groovy Sat Dec  7
15:59:30 2013
@@ -24,15 +24,22 @@
  * <http://www.apache.org/>.
  *
  */
+
+import com.google.common.collect.Multimap
+import org.reflections.Reflections
+import org.reflections.util.ClasspathHelper
+import org.reflections.util.ConfigurationBuilder
 import org.tmatesoft.svn.core.io.ISVNEditor
 import org.tmatesoft.svn.core.io.SVNRepository
 
 class HC {
 
-    static String REPO_ROOT = 'https://svn.apache.org/repos/asf/httpcomponents/'
-
-    static void createAndroidBranch(String coreVersion, String clientVersion, String branchName)
{
-        SVNRepository hcRepo = Svn.getRepository(new URI(REPO_ROOT))
+    static void createAndroidBranch(
+            URI repoRoot,
+            String coreVersion,
+            String clientVersion,
+            String branchName) {
+        SVNRepository hcRepo = Svn.getRepository(repoRoot)
 
         try {
             ISVNEditor commitEditor = hcRepo.getCommitEditor(
@@ -73,17 +80,22 @@ class HC {
         }
     }
 
-    static void main(String[] args) {
-        String branchName = 'test-branch'
-
-        createAndroidBranch('4.3', '4.3.1', branchName)
-
-        File tmpDir = new File("build/${branchName}")
-        if (!tmpDir.exists()) {
-            tmpDir.mkdirs()
+    static Set<Class<?>> getClassesFromJars(Collection<File> jars) {
+        URL[] urls = jars.collect { File file ->
+            file.toURI().toURL()
         }
+        URLClassLoader urlClassLoader = new URLClassLoader(urls)
 
-        Svn.checkout(new URI("${REPO_ROOT}httpclient-android/branches/${branchName}"), tmpDir)
+        Reflections reflections = new ConfigurationBuilder()
+                .setUrls(ClasspathHelper.forPackage("org.apache.http", urlClassLoader))
+                .setScanners(new GetAllScanner())
+                .build()
+        Multimap<String, String> multimap = reflections.getStore().get(GetAllScanner)
+        Set<Class<?>> allClasses = new HashSet<Class<?>>()
+        for (String key: multimap.keySet()) {
+            allClasses.add(urlClassLoader.loadClass(key))
+        }
+        allClasses
     }
 
 }

Copied: httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/Svn.groovy (from
r1548935, httpcomponents/httpclient-android/trunk/src/main/groovy/Svn.groovy)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/Svn.groovy?p2=httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/Svn.groovy&p1=httpcomponents/httpclient-android/trunk/src/main/groovy/Svn.groovy&r1=1548935&r2=1548936&rev=1548936&view=diff
==============================================================================
--- httpcomponents/httpclient-android/trunk/src/main/groovy/Svn.groovy (original)
+++ httpcomponents/httpclient-android/trunk/buildSrc/src/main/groovy/Svn.groovy Sat Dec  7
15:59:30 2013
@@ -1,232 +1,232 @@
-/*
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-import org.tmatesoft.svn.cli.SVNConsoleAuthenticationProvider
-import org.tmatesoft.svn.cli.svn.SVNCommandEnvironment
-import org.tmatesoft.svn.cli.svn.SVNNotifyPrinter
-import org.tmatesoft.svn.cli.svn.SVNStatusPrinter
-import org.tmatesoft.svn.core.SVNCommitInfo
-import org.tmatesoft.svn.core.SVNDepth
-import org.tmatesoft.svn.core.SVNException
-import org.tmatesoft.svn.core.SVNURL
-import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager
-import org.tmatesoft.svn.core.internal.wc17.SVNWCContext
-import org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec
-import org.tmatesoft.svn.core.io.SVNRepository
-import org.tmatesoft.svn.core.io.SVNRepositoryFactory
-import org.tmatesoft.svn.core.wc.SVNRevision
-import org.tmatesoft.svn.core.wc.SVNWCUtil
-import org.tmatesoft.svn.core.wc2.ISvnObjectReceiver
-import org.tmatesoft.svn.core.wc2.SvnCheckout
-import org.tmatesoft.svn.core.wc2.SvnCommit
-import org.tmatesoft.svn.core.wc2.SvnCopySource
-import org.tmatesoft.svn.core.wc2.SvnGetStatus
-import org.tmatesoft.svn.core.wc2.SvnOperationFactory
-import org.tmatesoft.svn.core.wc2.SvnRemoteCopy
-import org.tmatesoft.svn.core.wc2.SvnRemoteDelete
-import org.tmatesoft.svn.core.wc2.SvnRevert
-import org.tmatesoft.svn.core.wc2.SvnScheduleForAddition
-import org.tmatesoft.svn.core.wc2.SvnStatus
-import org.tmatesoft.svn.core.wc2.SvnTarget
-import org.tmatesoft.svn.core.wc2.SvnUpdate
-
-class Svn {
-
-    private static SVNCommandEnvironment getSVNCommandEnvironment() {
-        new SVNCommandEnvironment("SVN", System.out, System.err, System.in);
-    }
-
-    private static SvnOperationFactory createOperationFactory(SVNCommandEnvironment env)
{
-        SvnOperationFactory opfactory = new SvnOperationFactory()
-        ISVNAuthenticationManager authmanager = SVNWCUtil.createDefaultAuthenticationManager()
-        authmanager.setAuthenticationProvider(new SVNConsoleAuthenticationProvider(false))
-        opfactory.setAuthenticationManager(authmanager)
-        opfactory.setEventHandler(new SVNNotifyPrinter(env))
-        opfactory
-    }
-
-    static SVNRepository getRepository(URI src) {
-        SVNURL url = SVNURL.parseURIEncoded(src.toASCIIString())
-        SVNRepository repo = SVNRepositoryFactory.create(url)
-        ISVNAuthenticationManager authmanager = SVNWCUtil.createDefaultAuthenticationManager()
-        authmanager.setAuthenticationProvider(new SVNConsoleAuthenticationProvider(false))
-        repo.setAuthenticationManager(authmanager)
-        repo
-    }
-
-    static void checkout(URI src, File dst) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnCheckout checkoutOp = opfactory.createCheckout()
-            checkoutOp.setSource(SvnTarget.fromURL(SVNURL.parseURIEncoded(src.toASCIIString())))
-            checkoutOp.setSingleTarget(SvnTarget.fromFile(dst))
-            checkoutOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static void update(File dir) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnUpdate updateOp = opfactory.createUpdate()
-            updateOp.setSingleTarget(SvnTarget.fromFile(dir))
-            updateOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static void status(File dir) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SVNStatusPrinter statusPrinter = new SVNStatusPrinter(env)
-            SVNWCContext context = opfactory.getWcContext();
-            SvnGetStatus statusOp = opfactory.createGetStatus()
-            statusOp.setSingleTarget(SvnTarget.fromFile(dir))
-            statusOp.setReportAll(false)
-            statusOp.setReceiver(new ISvnObjectReceiver<SvnStatus>() {
-
-                @Override
-                void receive(SvnTarget target, SvnStatus object) throws SVNException {
-                    String root = dir.getAbsoluteFile();
-                    String f = target.getFile().getAbsolutePath()
-                    if (f.startsWith(root)) {
-                        f = f.substring(root.length())
-                        if (f.startsWith('/')) {
-                            f = f.substring(1, f.length() - 1)
-                        }
-                    }
-                    statusPrinter.printStatus(f,
-                            SvnCodec.status(context, object), false, true, true, false)
-                }
-
-            })
-            statusOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static void revert(File dir) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnRevert revertOp = opfactory.createRevert()
-            revertOp.setSingleTarget(SvnTarget.fromFile(dir))
-            revertOp.setDepth(SVNDepth.INFINITY)
-            revertOp.setPreserveModifiedCopies(false)
-            revertOp.setRevertMissingDirectories(true)
-            revertOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static void scheduleForAddition(File dir) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnScheduleForAddition schedulingOp = opfactory.createScheduleForAddition()
-            schedulingOp.setSingleTarget(SvnTarget.fromFile(dir))
-            schedulingOp.setDepth(SVNDepth.INFINITY)
-            schedulingOp.setForce(true)
-            schedulingOp.setIncludeIgnored(false)
-            schedulingOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static long commit(File dir, String message) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnCommit commitOp = opfactory.createCommit()
-            commitOp.setSingleTarget(SvnTarget.fromFile(dir))
-            commitOp.setDepth(SVNDepth.INFINITY)
-            commitOp.setCommitMessage(message)
-            SVNCommitInfo result = commitOp.run()
-            result.newRevision
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static long copyLocal(File dir, URI dst, String message) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnRemoteCopy copyOp = opfactory.createRemoteCopy()
-            copyOp.addCopySource(
-                    SvnCopySource.create(SvnTarget.fromFile(dir), SVNRevision.WORKING))
-            copyOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(dst.toASCIIString())))
-            copyOp.setFailWhenDstExists(true)
-            copyOp.setDisableLocalModifications(false)
-            copyOp.setCommitMessage(message)
-            SVNCommitInfo result = copyOp.run()
-            result.newRevision
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static long copyRemote(URI src, URI dst, String message) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnRemoteCopy copyOp = opfactory.createRemoteCopy()
-            copyOp.addCopySource(
-                    SvnCopySource.create(SvnTarget.fromURL(
-                            SVNURL.parseURIEncoded(src.toASCIIString())), SVNRevision.HEAD))
-            copyOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(dst.toASCIIString())))
-            copyOp.setFailWhenDstExists(true)
-            copyOp.setCommitMessage(message)
-            SVNCommitInfo result = copyOp.run()
-            result.newRevision
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-    static void deleteRemote(URI src, String message) {
-        SVNCommandEnvironment env = getSVNCommandEnvironment()
-        SvnOperationFactory opfactory = createOperationFactory(env)
-        try {
-            SvnRemoteDelete deleteOp = opfactory.createRemoteDelete()
-            deleteOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(src.toASCIIString())))
-            deleteOp.setCommitMessage(message)
-            deleteOp.run()
-        } finally {
-            opfactory.dispose()
-        }
-    }
-
-}
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+import org.tmatesoft.svn.cli.SVNConsoleAuthenticationProvider
+import org.tmatesoft.svn.cli.svn.SVNCommandEnvironment
+import org.tmatesoft.svn.cli.svn.SVNNotifyPrinter
+import org.tmatesoft.svn.cli.svn.SVNStatusPrinter
+import org.tmatesoft.svn.core.SVNCommitInfo
+import org.tmatesoft.svn.core.SVNDepth
+import org.tmatesoft.svn.core.SVNException
+import org.tmatesoft.svn.core.SVNURL
+import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager
+import org.tmatesoft.svn.core.internal.wc17.SVNWCContext
+import org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec
+import org.tmatesoft.svn.core.io.SVNRepository
+import org.tmatesoft.svn.core.io.SVNRepositoryFactory
+import org.tmatesoft.svn.core.wc.SVNRevision
+import org.tmatesoft.svn.core.wc.SVNWCUtil
+import org.tmatesoft.svn.core.wc2.ISvnObjectReceiver
+import org.tmatesoft.svn.core.wc2.SvnCheckout
+import org.tmatesoft.svn.core.wc2.SvnCommit
+import org.tmatesoft.svn.core.wc2.SvnCopySource
+import org.tmatesoft.svn.core.wc2.SvnGetStatus
+import org.tmatesoft.svn.core.wc2.SvnOperationFactory
+import org.tmatesoft.svn.core.wc2.SvnRemoteCopy
+import org.tmatesoft.svn.core.wc2.SvnRemoteDelete
+import org.tmatesoft.svn.core.wc2.SvnRevert
+import org.tmatesoft.svn.core.wc2.SvnScheduleForAddition
+import org.tmatesoft.svn.core.wc2.SvnStatus
+import org.tmatesoft.svn.core.wc2.SvnTarget
+import org.tmatesoft.svn.core.wc2.SvnUpdate
+
+class Svn {
+
+    private static SVNCommandEnvironment getSVNCommandEnvironment() {
+        new SVNCommandEnvironment("SVN", System.out, System.err, System.in);
+    }
+
+    private static SvnOperationFactory createOperationFactory(SVNCommandEnvironment env)
{
+        SvnOperationFactory opfactory = new SvnOperationFactory()
+        ISVNAuthenticationManager authmanager = SVNWCUtil.createDefaultAuthenticationManager()
+        authmanager.setAuthenticationProvider(new SVNConsoleAuthenticationProvider(false))
+        opfactory.setAuthenticationManager(authmanager)
+        opfactory.setEventHandler(new SVNNotifyPrinter(env))
+        opfactory
+    }
+
+    static SVNRepository getRepository(URI src) {
+        SVNURL url = SVNURL.parseURIEncoded(src.toASCIIString())
+        SVNRepository repo = SVNRepositoryFactory.create(url)
+        ISVNAuthenticationManager authmanager = SVNWCUtil.createDefaultAuthenticationManager()
+        authmanager.setAuthenticationProvider(new SVNConsoleAuthenticationProvider(false))
+        repo.setAuthenticationManager(authmanager)
+        repo
+    }
+
+    static void checkout(URI src, File dst) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnCheckout checkoutOp = opfactory.createCheckout()
+            checkoutOp.setSource(SvnTarget.fromURL(SVNURL.parseURIEncoded(src.toASCIIString())))
+            checkoutOp.setSingleTarget(SvnTarget.fromFile(dst))
+            checkoutOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static void update(File dir) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnUpdate updateOp = opfactory.createUpdate()
+            updateOp.setSingleTarget(SvnTarget.fromFile(dir))
+            updateOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static void status(File dir) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SVNStatusPrinter statusPrinter = new SVNStatusPrinter(env)
+            SVNWCContext context = opfactory.getWcContext();
+            SvnGetStatus statusOp = opfactory.createGetStatus()
+            statusOp.setSingleTarget(SvnTarget.fromFile(dir))
+            statusOp.setReportAll(false)
+            statusOp.setReceiver(new ISvnObjectReceiver<SvnStatus>() {
+
+                @Override
+                void receive(SvnTarget target, SvnStatus object) throws SVNException {
+                    String root = dir.getAbsoluteFile();
+                    String f = target.getFile().getAbsolutePath()
+                    if (f.startsWith(root)) {
+                        f = f.substring(root.length())
+                        if (f.startsWith('/')) {
+                            f = f.substring(1, f.length() - 1)
+                        }
+                    }
+                    statusPrinter.printStatus(f,
+                            SvnCodec.status(context, object), false, true, true, false)
+                }
+
+            })
+            statusOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static void revert(File dir) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnRevert revertOp = opfactory.createRevert()
+            revertOp.setSingleTarget(SvnTarget.fromFile(dir))
+            revertOp.setDepth(SVNDepth.INFINITY)
+            revertOp.setPreserveModifiedCopies(false)
+            revertOp.setRevertMissingDirectories(true)
+            revertOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static void scheduleForAddition(File dir) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnScheduleForAddition schedulingOp = opfactory.createScheduleForAddition()
+            schedulingOp.setSingleTarget(SvnTarget.fromFile(dir))
+            schedulingOp.setDepth(SVNDepth.INFINITY)
+            schedulingOp.setForce(true)
+            schedulingOp.setIncludeIgnored(false)
+            schedulingOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static long commit(File dir, String message) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnCommit commitOp = opfactory.createCommit()
+            commitOp.setSingleTarget(SvnTarget.fromFile(dir))
+            commitOp.setDepth(SVNDepth.INFINITY)
+            commitOp.setCommitMessage(message)
+            SVNCommitInfo result = commitOp.run()
+            result.newRevision
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static long copyLocal(File dir, URI dst, String message) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnRemoteCopy copyOp = opfactory.createRemoteCopy()
+            copyOp.addCopySource(
+                    SvnCopySource.create(SvnTarget.fromFile(dir), SVNRevision.WORKING))
+            copyOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(dst.toASCIIString())))
+            copyOp.setFailWhenDstExists(true)
+            copyOp.setDisableLocalModifications(false)
+            copyOp.setCommitMessage(message)
+            SVNCommitInfo result = copyOp.run()
+            result.newRevision
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static long copyRemote(URI src, URI dst, String message) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnRemoteCopy copyOp = opfactory.createRemoteCopy()
+            copyOp.addCopySource(
+                    SvnCopySource.create(SvnTarget.fromURL(
+                            SVNURL.parseURIEncoded(src.toASCIIString())), SVNRevision.HEAD))
+            copyOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(dst.toASCIIString())))
+            copyOp.setFailWhenDstExists(true)
+            copyOp.setCommitMessage(message)
+            SVNCommitInfo result = copyOp.run()
+            result.newRevision
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+    static void deleteRemote(URI src, String message) {
+        SVNCommandEnvironment env = getSVNCommandEnvironment()
+        SvnOperationFactory opfactory = createOperationFactory(env)
+        try {
+            SvnRemoteDelete deleteOp = opfactory.createRemoteDelete()
+            deleteOp.setSingleTarget(SvnTarget.fromURL(SVNURL.parseURIEncoded(src.toASCIIString())))
+            deleteOp.setCommitMessage(message)
+            deleteOp.run()
+        } finally {
+            opfactory.dispose()
+        }
+    }
+
+}

Added: httpcomponents/httpclient-android/trunk/gradle.properties
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/trunk/gradle.properties?rev=1548936&view=auto
==============================================================================
--- httpcomponents/httpclient-android/trunk/gradle.properties (added)
+++ httpcomponents/httpclient-android/trunk/gradle.properties Sat Dec  7 15:59:30 2013
@@ -0,0 +1,3 @@
+REPO_ROOT=https://svn.apache.org/repos/asf/httpcomponents
+HTTPCORE_VERSION=4.3
+HTTPCLIENT_VERSION=4.3.1
\ No newline at end of file

Propchange: httpcomponents/httpclient-android/trunk/gradle.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient-android/trunk/gradle.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient-android/trunk/gradle.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message