Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2294)

Unified Diff: build/android/ant/create-test-jar.js

Issue 212943003: android: Stop passing defines to apk-obfuscate.xml which it ignores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/java_apk.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/ant/create-test-jar.js
diff --git a/build/android/ant/create-test-jar.js b/build/android/ant/create-test-jar.js
deleted file mode 100644
index 855b47e2059034afa2581f2c11bdae66d73c85e9..0000000000000000000000000000000000000000
--- a/build/android/ant/create-test-jar.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * Combines classes from javac.custom.classpath property and ${out.dir}/classes
- * into a single jar file ${ant.project.name}.jar and places the file in
- * ${lib.java.dir}.
- */
-
-importClass(java.io.File);
-importClass(org.apache.tools.ant.types.Reference);
-importClass(org.apache.tools.ant.types.FileSet);
-importClass(org.apache.tools.ant.types.ZipFileSet);
-importClass(org.apache.tools.ant.taskdefs.Zip);
-
-var jarTask = project.createTask("jar");
-
-// Do not allow duplicates in the jar, the default behavior of Jar task
-// is "add" which means duplicates are allowed.
-// This can cause a class file to be included multiple times, setting the
-// duplicate to "preserve" ensures that only the first definition is included.
-
-var duplicate = Zip.Duplicate();
-duplicate.setValue("preserve");
-jarTask.setDuplicate(duplicate);
-
-var destPath = File(project.getProperty("TEST_JAR_PATH"));
-jarTask.setDestFile(destPath);
-
-// Include all the jars in the classpath.
-var javacCustomClasspath =
- project.getReference("javac.custom.classpath").list();
-
-for (var i in javacCustomClasspath) {
- var fileName = javacCustomClasspath[i]
- var fileExtension = fileName.split("\\.").pop();
- if(fileExtension == "jar")
- {
- var zipFileSet = ZipFileSet();
- zipFileSet.setIncludes("**/*.class");
- zipFileSet.setSrc(File(fileName));
- jarTask.addFileset(zipFileSet);
- }
-}
-
-// Add the compiled classes in ${out.dir}/classes.
-var projectClasses = FileSet();
-projectClasses.setIncludes("**/*.class");
-projectClasses.setDir(File(project.getProperty("out.dir") + "/classes"));
-jarTask.addFileset(projectClasses);
-
-// Exclude manifest and resource classes.
-var appPackagePath =
- (project.getProperty("project.app.package")).replace('.','/');
-var excludedClasses = ["R.class", "R$*.class", "Manifest.class",
- "Manifest$*.class", "BuildConfig.class"]
-
-var exclusionString = "";
-for (var i in excludedClasses) {
- exclusionString += appPackagePath+ "/" + excludedClasses[i] + " ";
-}
-
-jarTask.setExcludes(exclusionString);
-jarTask.perform();
« no previous file with comments | « no previous file | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698