Merge branch 'api-24' into 'master'
Api 24 Based on https://gitlab.com/fdroid/fdroidclient/merge_requests/352 with fixes for robolectric See merge request !360
This commit is contained in:
commit
f9bfe2a877
@ -1,4 +1,4 @@
|
||||
image: mvdan/fdroid-ci:client-20160706
|
||||
image: mvdan/fdroid-ci:client-20160709
|
||||
|
||||
cache:
|
||||
paths:
|
||||
@ -47,12 +47,12 @@ connected10:
|
||||
- exit $EXITVALUE
|
||||
allow_failure: true # remove once install segfaults are gone
|
||||
|
||||
connected23:
|
||||
connected24:
|
||||
variables:
|
||||
AVD_SDK: "23"
|
||||
AVD_SDK: "24"
|
||||
script:
|
||||
- export GRADLE_USER_HOME=$PWD/.gradle
|
||||
- emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
|
||||
- emulator64-x86 -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
|
||||
- ./tools/wait-for-emulator
|
||||
- adb shell input keyevent 82 &
|
||||
- export EXITVALUE=0
|
||||
|
@ -10,12 +10,12 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.3'
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion '24.0.0'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 24
|
||||
versionCode 1050
|
||||
versionName "0.1"
|
||||
}
|
||||
|
@ -139,8 +139,8 @@ if (!hasProperty('sourceDeps')) {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.3'
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion '24.0.0'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
buildTypes {
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="10"
|
||||
android:targetSdkVersion="23"
|
||||
android:targetSdkVersion="24"
|
||||
/>
|
||||
|
||||
<supports-screens
|
||||
|
@ -92,6 +92,6 @@ public class DefaultInstaller extends Installer {
|
||||
@Override
|
||||
protected boolean supportsContentUri() {
|
||||
// Android N only supports content Uris
|
||||
return Build.VERSION.SDK_INT >= 24; // TODO: Use Build.VERSION_CODES.N
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
|
||||
}
|
||||
}
|
||||
|
@ -79,11 +79,11 @@ public class DefaultInstallerActivity extends FragmentActivity {
|
||||
throw new RuntimeException("Set the data uri to point to an apk location!");
|
||||
}
|
||||
// https://code.google.com/p/android/issues/detail?id=205827
|
||||
if ((Build.VERSION.SDK_INT < 24) // TODO: Use Build.VERSION_CODES.N
|
||||
if ((Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
|
||||
&& (!uri.getScheme().equals("file"))) {
|
||||
throw new RuntimeException("PackageInstaller < Android N only supports file scheme!");
|
||||
}
|
||||
if ((Build.VERSION.SDK_INT >= 24) // TODO: Use Build.VERSION_CODES.N
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
&& (!uri.getScheme().equals("content"))) {
|
||||
throw new RuntimeException("PackageInstaller >= Android N only supports content scheme!");
|
||||
}
|
||||
@ -103,7 +103,7 @@ public class DefaultInstallerActivity extends FragmentActivity {
|
||||
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true);
|
||||
intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_REPLACE, true);
|
||||
} else if (Build.VERSION.SDK_INT < 24) { // TODO: Use Build.VERSION_CODES.N
|
||||
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
||||
intent.setAction(Intent.ACTION_INSTALL_PACKAGE);
|
||||
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true);
|
||||
intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);
|
||||
|
@ -19,7 +19,8 @@ import java.util.List;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
@Config(constants = BuildConfig.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class AcceptableMultiRepoUpdaterTest extends MultiRepoUpdaterTest {
|
||||
private static final String TAG = "AcceptableMultiRepoTest";
|
||||
|
@ -38,7 +38,8 @@ import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@Config(constants = BuildConfig.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class RepoXMLHandlerTest {
|
||||
private static final String TAG = "RepoXMLHandlerTest";
|
||||
|
@ -15,7 +15,8 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Config(constants = BuildConfig.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class UtilsTest {
|
||||
|
||||
|
@ -31,7 +31,8 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@Config(constants = BuildConfig.class, application = Application.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, application = Application.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class ApkProviderTest extends FDroidProviderTest {
|
||||
|
||||
|
@ -27,7 +27,8 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Config(constants = BuildConfig.class, application = Application.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, application = Application.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class AppProviderTest extends FDroidProviderTest {
|
||||
|
||||
|
@ -23,7 +23,8 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Config(constants = BuildConfig.class, application = Application.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, application = Application.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class InstalledAppProviderTest extends FDroidProviderTest {
|
||||
|
||||
|
@ -20,7 +20,8 @@ import java.util.List;
|
||||
import static org.fdroid.fdroid.Assert.assertInvalidUri;
|
||||
import static org.fdroid.fdroid.Assert.assertValidUri;
|
||||
|
||||
@Config(constants = BuildConfig.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class ProviderUriTests {
|
||||
|
||||
|
@ -13,7 +13,8 @@ import java.io.IOException;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Config(constants = BuildConfig.class)
|
||||
// TODO: Use sdk=24 when Robolectric supports this
|
||||
@Config(constants = BuildConfig.class, sdk = 23)
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
public class ApkCacheTest {
|
||||
|
||||
|
@ -19,7 +19,7 @@ dependencies {
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '23.0.2'
|
||||
buildToolsVersion '24.0.0'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
|
@ -1,12 +1,12 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.3'
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion '24.0.0'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 24
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user