Parse maxSdkVersion and -23 permission tags
Parse maxSdkVersion and uses-permission-sdk-23 tags and insert them into the index.
AndroidManifest:
```xml
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" />
```
new index format:
```xml
<package>
<version>1.0</version>
<versioncode>1</versioncode>
<apkname>maxmin.apk</apkname>
<hash type="sha256">
526eb6d643050c3fae42fb6c001c704006046db52e98998b21f7646ecae3dae5
</hash>
<sig>
893fc1f22301c902d05c938b29d21648</sig>
<size>8681</size>
<sdkver>14</sdkver>
<targetSdkVersion>24</targetSdkVersion>
<added>2016-08-01</added>
<permissions>READ_EXTERNAL_STORAGE,READ_CALENDAR,WRITE_EXTERNAL_STORAGE</permissions>
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE"
maxSdkVersion="18" />
<uses-permission name="android.permission.READ_CALENDAR" />
<uses-permission name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission-sdk-23 name="android.permission.ACCESS_FINE_LOCATION" />
</package>
```
old format:
```xml
<permissions>READ_CALENDAR,ACCESS_FINE_LOCATION,WRITE_EXTERNAL_STORAGE</permissions>
```
This generates both formats for backward compatibility with old clients.
Also increase version of index format.
This is a proposal for the issues discussed in https://gitlab.com/fdroid/fdroidclient/issues/704
@eighthave @mvdan
See merge request !150
-image: mvdan/fdroid-ci:server-20160621
+image: mvdan/fdroid-ci:server-20160731
test:
script:
sudo pip3 install pep8 pyflakes pylint;
sudo pip3 install -e .;
sudo rm -rf fdroidserver.egg-info;
- echo y | android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-24.0.0;
+ echo y | android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-24.0.1;
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository ppa:guardianproject/fdroidserver -y;
sudo apt-get -q update -y;
fi
if [ ! -e $NDK_BASE/r12b ]; then
- 7zr x /vagrant/cache/android-ndk-r12b-linux-x86_64.bin > /dev/null
+ unzip /vagrant/cache/android-ndk-r12b-linux-x86_64.zip > /dev/null
mv android-ndk-r12b r12b
fi
# install all cached build-tools
for f in `ls -1 build-tools*.zip`; do
ver=`unzip -c $f "*/source.properties" | sed -n 's,^Pkg.Revision=,,p'`
+ if [[ $ver == 24.0.0 ]] && [[ $f =~ .*r24\.0\.1.* ]]; then
+ # 24.0.1 has the wrong revision in the zip
+ ver=24.0.1
+ fi
cached=,build-tools-${ver}${cached}
done
packages="
ant
+ asn1c
ant-contrib
autoconf
autoconf2.13
quilt
realpath
scons
+ sqlite3
subversion
swig
texinfo
# }
# Build tools version to be used
-# build_tools = "24.0.0"
+# build_tools = "24.0.1"
# Force all build to use the above version of build -tools, good for testing
# builds without having all of the possible build-tools installed.
'r10e': None,
'r12b': "$ANDROID_NDK",
},
- 'build_tools': "24.0.0",
+ 'build_tools': "24.0.1",
'force_build_tools': False,
'java_paths': None,
'ant': "ant",
apppagename = apppagename.replace('{', '')
apppagename = apppagename.replace('}', ' ')
apppagename = apppagename.replace(':', ' ')
+ apppagename = apppagename.replace('[', ' ')
+ apppagename = apppagename.replace(']', ' ')
# Drop double spaces caused mostly by replacing ':' above
apppagename = apppagename.replace(' ', ' ')
for expagename in site.allpages(prefix=apppagename,