Skip to content

Commit

Permalink
Update target sdk and compile sdk to 30
Browse files Browse the repository at this point in the history
  • Loading branch information
darshanparajuli committed Mar 6, 2021
1 parent 6a9d3a3 commit 4cada79
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 21 deletions.
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ apply plugin: 'kotlin-kapt'
def fileProvider = "file_provider"

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.dp.logcatapp"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 30
versionCode 32
versionName "1.7.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -79,16 +79,18 @@ dependencies {
implementation "com.google.android.material:material:$material_version"
implementation "androidx.preference:preference-ktx:$preference_version"
implementation "androidx.legacy:legacy-preference-v14:$legacy_preference_v14_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_common_java8_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_extensions_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_viewmodel_ktx_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_runtime_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_ext"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.constraintlayout:constraintlayout:$constraint_layout_version"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.documentfile:documentfile:$documentfile_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_core_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_android_version"

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test:runner:$runner_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core_version"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/com/dp/logcatapp/util/SuCommander.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.dp.logcatapp.util

import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.withContext
import java.io.BufferedReader
import java.io.BufferedWriter
import java.io.InputStreamReader
Expand All @@ -21,7 +23,7 @@ class SuCommander(private val cmd: String) {
suspend fun run() = coroutineScope {
try {
val processBuilder = ProcessBuilder("su")
val process = processBuilder.start()
val process = withContext(IO) { processBuilder.start() }

val stdoutWriter = BufferedWriter(OutputStreamWriter(process.outputStream))
val stdinReader = BufferedReader(InputStreamReader(process.inputStream))
Expand Down Expand Up @@ -65,7 +67,7 @@ class SuCommander(private val cmd: String) {

stdoutWriter.writeCmd("exit")

process.waitFor()
withContext(IO) { process.waitFor() }
process.destroy()

stderrReaderResult.await()
Expand Down
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.4.10'
ext.kotlin_version = '1.4.31'
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -18,6 +19,7 @@ buildscript {
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
Expand All @@ -27,20 +29,18 @@ ext {
constraint_layout_version = "2.0.4"
core_ktx_version = "1.3.2"
documentfile_version = "1.0.1"
fragment_ktx_version = "1.2.5"
fragment_ktx_version = "1.3.0"
kotlin_coroutines_android_version = "1.3.7"
kotlin_coroutines_core_version = "1.3.7"
legacy_preference_v14_version = "1.0.0"
lifecycle_common_java8_version = "2.2.0"
lifecycle_extensions_version = "2.2.0"
lifecycle_runtime_version = "2.2.0"
lifecycle_viewmodel_ktx_version = "2.2.0"
material_version = "1.2.1"
lifecycle_ext = "2.2.0"
lifecycle_version = "2.3.0"
material_version = "1.3.0"
preference_version = "1.1.1"
room_version = "2.2.5"
room_version = "2.2.6"

// test dependencies
junit_version = "4.13"
junit_version = "4.13.2"
runner_version = "1.3.0"
espresso_core_version = "3.3.0"
}
Expand Down
1 change: 1 addition & 0 deletions collections/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appcompat_version"

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test:runner:$runner_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core_version"
Expand Down
5 changes: 3 additions & 2 deletions logcat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_common_java8_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_extensions_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_ext"
implementation "androidx.documentfile:documentfile:$documentfile_version"

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test:runner:$runner_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core_version"
Expand Down
1 change: 1 addition & 0 deletions logger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test:runner:$runner_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core_version"
Expand Down

0 comments on commit 4cada79

Please sign in to comment.