From 45e0f5f9352dc9e63b7b784e313c04cf4893664f Mon Sep 17 00:00:00 2001 From: Matthew Hague Date: Fri, 12 May 2017 19:41:14 +0100 Subject: [PATCH] Xabber: use jitpack instead of untrusted igniterealtime repo. Xabber upstream uses an untrusted Maven repository (igniterealtime) to download the latest versions of Smack. I have replaced this with jitpack.io which imports Smack from igniterealtime's github and creates Maven packages. Updates now need to be manual to ensure the versions used by Xabber match the commit used by jitpack. A gradle.properties entry has been added to make this easy, so only one line of the Xabber metadata needs changing for each update. --- metadata/com.xabber.androiddev.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/metadata/com.xabber.androiddev.txt b/metadata/com.xabber.androiddev.txt index a07f3e5ba9..8136bbf279 100644 --- a/metadata/com.xabber.androiddev.txt +++ b/metadata/com.xabber.androiddev.txt @@ -456,14 +456,29 @@ Build:2.0.0,347 output=build/outputs/apk/xabber-dev-universal-release-unsigned.apk Build:2.0.1,348 - disable=untrusted repo commit=2.0.1 subdir=xabber submodules=yes gradle=dev output=build/outputs/apk/xabber-dev-universal-release-unsigned.apk + prebuild=echo "smackCommitShortHash=8466a5a" >> gradle.properties && \ + sed -i "s/maven { url 'https:\/\/igniterealtime.org\/repo' }//" ../build.gradle && \ + sed -i 's/compile \"org.igniterealtime.smack:smack-android-extensions.*\"/compile \"com.github.igniterealtime.smack:smack-android-extensions:$smackCommitShortHash\"/' build.gradle && \ + sed -i 's/compile \"org.igniterealtime.smack:smack-experimental.*\"/compile \"com.github.igniterealtime.smack:smack-experimental:$smackCommitShortHash\"/' build.gradle && \ + sed -i 's/compile \"org.igniterealtime.smack:smack-experimental.*\"/compile \"com.github.igniterealtime.smack:smack-experimental:$smackCommitShortHash\"/' build.gradle && \ + sed -i 's/compile \"org.igniterealtime.smack:smack-tcp.*\"/compile \"com.github.igniterealtime.smack:smack-tcp:$smackCommitShortHash\"/' build.gradle && \ + sed -i 's/compile \"org.igniterealtime.smack:smack-resolver-dnsjava.*\"/compile \"com.github.igniterealtime.smack:smack-resolver-dnsjava:$smackCommitShortHash\"/' build.gradle -Auto Update Mode:Version %v -Update Check Mode:Tags +Maintainer Notes: +Upstream uses the (untrusted) igniterealtime Maven repository for Smack. +While it does this, before adding an update, make sure +smackCommitShortHash is the commit corresponding to the Smack snapshot +used by upstream. To do this, cross reference xabber/build.gradle +dependencies (version/date) with commits in igniterealtime's Smack +github respository (may not be in master branch). +. + +Auto Update Mode:None +Update Check Mode:None Current Version:2.0.1 Current Version Code:348