Commit 044eecfc authored by Benoit Lavenier's avatar Benoit Lavenier

build: fix android manifest patch

parent 76162fbc
......@@ -27,11 +27,11 @@ if (rootdir) {
// Add 'tools' namespace to root tag
.pipe(replace(/(xmlns:android="http:\/\/schemas.android.com\/apk\/res\/android")\s*>/g, '$1 xmlns:tools="http://schemas.android.com/tools">'))
// <uses-sdk> : if many, keep only one
.pipe(replace(/(<uses-sdk [^>]+>)(:?[\n\r\s\t ]*<uses-sdk [^>]+>)+/mg, '$1'))
// remove all <uses-sdk>
.pipe(replace(/<uses-sdk [^>]+\/>/g, ''))
// <uses-sdk> : Replace 'targetSdkversion' and add tools:overrideLibrary
.pipe(replace(/android:targetSdkVersion="[0-9]+"( tools:overrideLibrary="org.kaliumjni.lib")?\s*\/>/g, 'android:targetSdkVersion="25" tools:overrideLibrary="org.kaliumjni.lib" />'))
// add <uses-sdk> (replace 'targetSdkversion' and add tools:overrideLibrary)
.pipe(replace(/(<\/manifest>)/, ' <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" tools:overrideLibrary="org.kaliumjni.lib" />\n$1'))
.pipe(gulp.dest(platformPath));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment