cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Clelland <iclell...@google.com>
Subject Re: android commit: Remove Ant custom build directories
Date Fri, 06 Jun 2014 18:39:14 GMT
Done (on a 4.0.x docs branch)


On Fri, Jun 6, 2014 at 11:33 AM, Ian Clelland <iclelland@google.com> wrote:

> Thanks, Marcel. I'll take care of that one too
>
>
> On Friday, June 6, 2014, Marcel Kinard <cmarcelk@gmail.com> wrote:
>
>> Ian, there is also this doc that may need to be mostly reverted:
>>
>>
>> https://github.com/apache/cordova-docs/commit/d520506be5068ae290a4209401305815548487f3
>>
>> Begin forwarded message:
>>
>> > From: ian@apache.org
>> > Subject: android commit: Remove Ant custom build directories
>> > Date: June 6, 2014 at 10:45:44 AM EDT
>> > To: commits@cordova.apache.org
>> > Reply-To: dev@cordova.apache.org
>> >
>> > Repository: cordova-android
>> > Updated Branches:
>> >  refs/heads/4.0.x b42faea2e -> 7e9fdb355
>> >
>> >
>> > Remove Ant custom build directories
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
>> > Commit:
>> http://git-wip-us.apache.org/repos/asf/cordova-android/commit/7e9fdb35
>> > Tree:
>> http://git-wip-us.apache.org/repos/asf/cordova-android/tree/7e9fdb35
>> > Diff:
>> http://git-wip-us.apache.org/repos/asf/cordova-android/diff/7e9fdb35
>> >
>> > Branch: refs/heads/4.0.x
>> > Commit: 7e9fdb3555dffb155fd1ecb0d99fd49aa9f46108
>> > Parents: b42faea
>> > Author: Ian Clelland <iclelland@chromium.org>
>> > Authored: Thu Jun 5 12:59:57 2014 -0400
>> > Committer: Ian Clelland <iclelland@chromium.org>
>> > Committed: Thu Jun 5 13:11:14 2014 -0400
>> >
>> > ----------------------------------------------------------------------
>> > bin/lib/create.js                      |  4 +++-
>> > bin/templates/cordova/lib/build.js     | 20 ++------------------
>> > bin/templates/project/custom_rules.xml | 21 ---------------------
>> > 3 files changed, 5 insertions(+), 40 deletions(-)
>> > ----------------------------------------------------------------------
>> >
>> >
>> >
>> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7e9fdb35/bin/lib/create.js
>> > ----------------------------------------------------------------------
>> > diff --git a/bin/lib/create.js b/bin/lib/create.js
>> > index dbdb84f..1ddab04 100755
>> > --- a/bin/lib/create.js
>> > +++ b/bin/lib/create.js
>> > @@ -89,7 +89,9 @@ function runAndroidUpdate(projectPath, target_api,
>> shared) {
>> >
>> > function copyAntRules(projectPath) {
>> >     var srcDir = path.join(ROOT, 'bin', 'templates', 'project');
>> > -    shell.cp('-f', path.join(srcDir, 'custom_rules.xml'), projectPath);
>> > +    if (fs.existsSync(path.join(srcDir, 'custom_rules.xml'))) {
>> > +        shell.cp('-f', path.join(srcDir, 'custom_rules.xml'),
>> projectPath);
>> > +    }
>> > }
>> >
>> > function copyScripts(projectPath) {
>> >
>> >
>> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7e9fdb35/bin/templates/cordova/lib/build.js
>> > ----------------------------------------------------------------------
>> > diff --git a/bin/templates/cordova/lib/build.js
>> b/bin/templates/cordova/lib/build.js
>> > index 9e5172c..5f100e2 100644
>> > --- a/bin/templates/cordova/lib/build.js
>> > +++ b/bin/templates/cordova/lib/build.js
>> > @@ -28,9 +28,6 @@ var shell   = require('shelljs'),
>> >     ROOT    = path.join(__dirname, '..', '..');
>> >
>> >
>> > -function hasCustomRules() {
>> > -    return fs.existsSync(path.join(ROOT, 'custom_rules.xml'));
>> > -}
>> > module.exports.getAntArgs = function(cmd) {
>> >     var args = [cmd, '-f', path.join(ROOT, 'build.xml')];
>> >     try {
>> > @@ -39,10 +36,6 @@ module.exports.getAntArgs = function(cmd) {
>> >     } catch(e) {
>> >       // Can't find android; don't push arg: assume all is okay
>> >     }
>> > -    // custom_rules.xml is required for incremental builds.
>> > -    if (hasCustomRules()) {
>> > -        args.push('-Dout.dir=ant-build', '-Dgen.absolute.dir=ant-gen');
>> > -    }
>> >     return args;
>> > };
>> >
>> > @@ -66,11 +59,7 @@ module.exports.run = function(build_type) {
>> >         default :
>> >             return Q.reject('Build option \'' + build_type + '\' not
>> recognized.');
>> >     }
>> > -    // Without our custom_rules.xml, we need to clean before building.
>> >     var ret = Q();
>> > -    if (!hasCustomRules()) {
>> > -        ret = require('./clean').run();
>> > -    }
>> >     return ret.then(function() {
>> >         return spawn('ant', args);
>> >     });
>> > @@ -81,12 +70,7 @@ module.exports.run = function(build_type) {
>> >  * the script will error out. (should we error or just return
>> undefined?)
>> >  */
>> > module.exports.get_apk = function() {
>> > -    var binDir = '';
>> > -    if(!hasCustomRules()) {
>> > -        binDir = path.join(ROOT, 'bin');
>> > -    } else {
>> > -        binDir = path.join(ROOT, 'ant-build');
>> > -    }
>> > +    var binDir = path.join(ROOT, 'bin');
>> >     if (fs.existsSync(binDir)) {
>> >         var candidates = fs.readdirSync(binDir).filter(function(p) {
>> >             // Need to choose between release and debug .apk.
>> > @@ -117,4 +101,4 @@ module.exports.help = function() {
>> >     console.log('    \'--release\': will build project using ant
>> release');
>> >     console.log('    \'--nobuild\': will skip build process (can be
>> used with run command)');
>> >     process.exit(0);
>> > -}
>> > +};
>> >
>> >
>> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7e9fdb35/bin/templates/project/custom_rules.xml
>> > ----------------------------------------------------------------------
>> > diff --git a/bin/templates/project/custom_rules.xml
>> b/bin/templates/project/custom_rules.xml
>> > deleted file mode 100644
>> > index 4b20e22..0000000
>> > --- a/bin/templates/project/custom_rules.xml
>> > +++ /dev/null
>> > @@ -1,21 +0,0 @@
>> > -<?xml version="1.0" encoding="UTF-8"?>
>> > -<project>
>> > -    <target name="-pre-compile">
>> > -        <!-- Fix library references due to bug in build.xml: See:
>> https://groups.google.com/forum/#!topic/android-developers/0ivH-YqCjzg
>> -->
>> > -        <pathconvert property="fixedJarsPath"
>> refid="project.all.jars.path">
>> > -          <filtermapper>
>> > -            <replacestring from="/bin/" to="/ant-build/"/>
>> > -            <replacestring from="\bin\" to="\ant-build\"/>
>> > -          </filtermapper>
>> > -        </pathconvert>
>> > -        <path id="project.all.jars.path">
>> > -          <pathelement path="${fixedJarsPath}"/>
>> > -        </path>
>> > -        <echo message="Set jars path to:
>> ${toString:project.all.jars.path}"/>
>> > -    </target>
>> > -    <target name="-post-build">
>> > -        <move file="ant-build/AndroidManifest.xml"
>> tofile="ant-build/AndroidManifest.cordova.xml" failonerror="false"
>> overwrite="true" />
>> > -        <move file="CordovaLib/ant-build/AndroidManifest.xml"
>> tofile="CordovaLib/ant-build/AndroidManifest.cordova.xml"
>> failonerror="false" overwrite="true" />
>> > -    </target>
>> > -</project>
>> > -
>> >
>>
>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message