Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile against SDK 30 #78

Merged
merged 1 commit into from Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,11 +17,11 @@
package dev.chrisbanes.accompanist.buildsrc

object Versions {
const val ktlint = "0.37.2"
const val ktlint = "0.38.1"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha09"
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha10"

const val gradleMavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.12.0"

Expand Down
2 changes: 1 addition & 1 deletion coil/build.gradle
Expand Up @@ -21,7 +21,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
compileSdkVersion 30

defaultConfig {
minSdkVersion 21
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -18,4 +18,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
4 changes: 2 additions & 2 deletions sample/build.gradle
Expand Up @@ -21,12 +21,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
compileSdkVersion 30

defaultConfig {
applicationId "dev.chrisbanes.insetter.sample"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30

versionCode 1
versionName "1.0"
Expand Down
Expand Up @@ -14,9 +14,11 @@
* limitations under the License.
*/

@file:Suppress("DEPRECATION") // ListActivity

package dev.chrisbanes.accompanist.sample

import android.R
import android.annotation.SuppressLint
import android.app.ListActivity
import android.content.Intent
import android.os.Bundle
Expand All @@ -40,9 +42,9 @@ class MainActivity : ListActivity() {
listAdapter = SimpleAdapter(
this,
getData(intent.getStringExtra(EXTRA_PATH)),
R.layout.simple_list_item_1,
android.R.layout.simple_list_item_1,
arrayOf("title"),
intArrayOf(R.id.text1)
intArrayOf(android.R.id.text1)
)

listView.isTextFilterEnabled = true
Expand All @@ -54,7 +56,8 @@ class MainActivity : ListActivity() {
val mainIntent = Intent(Intent.ACTION_MAIN, null)
mainIntent.addCategory("dev.chrisbanes.accompanist.sample.SAMPLE_CODE")

val list = packageManager.queryIntentActivities(mainIntent, 0) ?: return myData
@SuppressLint("QueryPermissionsNeeded") // Only querying our own Activities
val list = packageManager.queryIntentActivities(mainIntent, 0)

val prefixPath: Array<String>?
var prefixWithSlash = prefix
Expand Down
Expand Up @@ -28,16 +28,18 @@ class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()

Coil.setImageLoader(object : ImageLoaderFactory {
override fun newImageLoader(): ImageLoader {
val coilOkHttpClient = OkHttpClient.Builder()
.cache(CoilUtils.createDefaultCache(this@SampleApplication))
.build()
Coil.setImageLoader(
object : ImageLoaderFactory {
override fun newImageLoader(): ImageLoader {
val coilOkHttpClient = OkHttpClient.Builder()
.cache(CoilUtils.createDefaultCache(this@SampleApplication))
.build()

return ImageLoader.Builder(this@SampleApplication)
.okHttpClient(coilOkHttpClient)
.build()
return ImageLoader.Builder(this@SampleApplication)
.okHttpClient(coilOkHttpClient)
.build()
}
}
})
)
}
}