Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c13002d4 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Switch to AndroidX

parent f695daa1
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line


buildscript {
buildscript {
    ext.kotlin_version = '1.2.71'
    ext.kotlin_version = '1.3.10'
    ext.dokka_version = '0.9.17'
    ext.dokka_version = '0.9.17'


    repositories {
    repositories {
@@ -9,7 +9,7 @@ buildscript {
    }
    }


    dependencies {
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_version"
        classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_version"
    }
    }
@@ -49,7 +49,7 @@ android {
    }
    }


    defaultConfig {
    defaultConfig {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    }
}
}


@@ -68,8 +68,8 @@ dependencies {
        exclude group: 'com.fasterxml.jackson.core'
        exclude group: 'com.fasterxml.jackson.core'
    }
    }


    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'com.android.support.test:rules:1.0.2'
    androidTestImplementation 'androidx.test:rules:1.1.0'


    testImplementation 'junit:junit:4.12'
    testImplementation 'junit:junit:4.12'
}
}
+1 −0
Original line number Original line Diff line number Diff line
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
+4 −4
Original line number Original line Diff line number Diff line
@@ -13,8 +13,8 @@ import android.accounts.Account
import android.content.ContentProviderClient
import android.content.ContentProviderClient
import android.content.ContentValues
import android.content.ContentValues
import android.provider.ContactsContract
import android.provider.ContactsContract
import android.support.test.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import android.support.test.rule.GrantPermissionRule
import androidx.test.rule.GrantPermissionRule
import at.bitfire.vcard4android.impl.TestAddressBook
import at.bitfire.vcard4android.impl.TestAddressBook
import org.junit.After
import org.junit.After
import org.junit.Assert.*
import org.junit.Assert.*
@@ -33,8 +33,8 @@ class AndroidAddressBookTest {


	@Before
	@Before
	fun connect() {
	fun connect() {
        val context = InstrumentationRegistry.getContext()
        val context = InstrumentationRegistry.getInstrumentation().context
		provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)
		provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)!!
        assertNotNull(provider)
        assertNotNull(provider)
    }
    }


+6 −6
Original line number Original line Diff line number Diff line
@@ -12,11 +12,11 @@ import android.Manifest
import android.accounts.Account
import android.accounts.Account
import android.content.ContentProviderClient
import android.content.ContentProviderClient
import android.provider.ContactsContract
import android.provider.ContactsContract
import android.support.test.InstrumentationRegistry
import android.support.test.filters.MediumTest
import android.support.test.filters.SmallTest
import android.support.test.rule.GrantPermissionRule
import android.util.Base64
import android.util.Base64
import androidx.test.filters.MediumTest
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.GrantPermissionRule
import at.bitfire.vcard4android.impl.TestAddressBook
import at.bitfire.vcard4android.impl.TestAddressBook
import ezvcard.VCardVersion
import ezvcard.VCardVersion
import ezvcard.property.Address
import ezvcard.property.Address
@@ -45,8 +45,8 @@ class AndroidContactTest {


    @Before
    @Before
    fun connect() {
    fun connect() {
        val context = InstrumentationRegistry.getContext()
        val context = InstrumentationRegistry.getInstrumentation().context
        provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)
        provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)!!
        assertNotNull(provider)
        assertNotNull(provider)


        addressBook = TestAddressBook(testAccount, provider)
        addressBook = TestAddressBook(testAccount, provider)
+4 −4
Original line number Original line Diff line number Diff line
@@ -12,8 +12,8 @@ import android.Manifest
import android.accounts.Account
import android.accounts.Account
import android.content.ContentProviderClient
import android.content.ContentProviderClient
import android.provider.ContactsContract
import android.provider.ContactsContract
import android.support.test.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import android.support.test.rule.GrantPermissionRule
import androidx.test.rule.GrantPermissionRule
import at.bitfire.vcard4android.impl.TestAddressBook
import at.bitfire.vcard4android.impl.TestAddressBook
import org.junit.After
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertEquals
@@ -35,8 +35,8 @@ class AndroidGroupTest {


    @Before
    @Before
    fun connect() {
    fun connect() {
        val context = InstrumentationRegistry.getContext()
        val context = InstrumentationRegistry.getInstrumentation().context
        provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)
        provider = context.contentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY)!!
        assertNotNull(provider)
        assertNotNull(provider)


        addressBook = TestAddressBook(testAccount, provider)
        addressBook = TestAddressBook(testAccount, provider)