Copy build-extras to platforms/android
#!/usr/bin/env node | |
//goes in hooks/after_platform_add/ | |
var fs = require('fs'); | |
rootdir = process.argv[2], | |
android_dir = rootdir + '/platforms/android'; | |
gradle_file = rootdir + '/build-extras.gradle'; | |
dest_gradle_file = android_dir + '/build-extras.gradle'; | |
if (fs.existsSync(android_dir) && fs.existsSync(gradle_file)) { | |
console.log('Copy ' + gradle_file + ' to ' + android_dir); | |
fs.createReadStream(gradle_file).pipe(fs.createWriteStream(dest_gradle_file)); | |
} else { | |
console.log(gradle_file + ' not found. Skipping'); | |
} |
This comment has been minimized.
This comment has been minimized.
@charlesbedrosian thank you! @GBoll as comment states:
You must set it executable. |
This comment has been minimized.
This comment has been minimized.
I had to copy to |
This comment has been minimized.
This comment has been minimized.
Hi Charles, I wanted to know how add the build-extras.gradle code to build.gradle file. Because I am facing an issue when I am trying to add the build-extras.gradle file data to build.gradle file. Below is the error which I am facing
And this is my build-extras.gradle code
Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Hi, where does this .js file go? I use cordova cli. My only plugin is Crosswalk, which doesn't even have anything like com.android.support:support-v4:24.0.0 anywhere.
thx