Skip to content

Commit

Permalink
Merge pull request #78 from chrisbanes/cb/sdk30
Browse files Browse the repository at this point in the history
Compile against SDK 30
  • Loading branch information
probot-auto-merge[bot] committed Sep 15, 2020
2 parents 09e8a1e + 120b171 commit adad8c7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
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()
}
}
})
)
}
}

0 comments on commit adad8c7

Please sign in to comment.