diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 7e340a7..2b8a50f 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/androidutils/build.gradle b/androidutils/build.gradle index b9bfa15..5059f67 100644 --- a/androidutils/build.gradle +++ b/androidutils/build.gradle @@ -1,17 +1,16 @@ plugins { id 'com.android.library' id 'kotlin-android' - id 'kotlin-android-extensions' id 'kotlin-kapt' } android { - compileSdkVersion 33 + compileSdkVersion 34 buildToolsVersion "30.0.3" defaultConfig { minSdkVersion 19 - targetSdkVersion 33 + targetSdkVersion 34 versionCode 1 versionName "1.0" @@ -37,13 +36,13 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.5.0' - implementation 'androidx.appcompat:appcompat:1.3.0' - implementation 'com.google.android.material:material:1.3.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' // glide implementation "com.github.bumptech.glide:glide:4.11.0" diff --git a/androidutils/src/main/java/com/xihad/androidutils/utils/AppUtil.kt b/androidutils/src/main/java/com/xihad/androidutils/utils/AppUtil.kt index 31984a6..f371fb9 100644 --- a/androidutils/src/main/java/com/xihad/androidutils/utils/AppUtil.kt +++ b/androidutils/src/main/java/com/xihad/androidutils/utils/AppUtil.kt @@ -115,13 +115,5 @@ object AppUtil { } - fun deleteCache(context: Context) { - context.cacheDir.deleteRecursively() - } - - fun Context.deleteCache() { - this.cacheDir.deleteRecursively() - } - } \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index b01ce2c..f309c4f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,18 +1,17 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' id 'kotlin-kapt' } android { - compileSdkVersion 33 + compileSdkVersion 34 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.xd.androidutils" minSdkVersion 19 - targetSdkVersion 33 + targetSdkVersion 34 versionCode 1 versionName "1.0" @@ -37,13 +36,13 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.5.0' - implementation 'androidx.appcompat:appcompat:1.3.0' - implementation 'com.google.android.material:material:1.3.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation project(path: ':androidutils') - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + testImplementation 'junit:junit:' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fba7048..436f7c4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,8 +9,9 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.AndroidUtils"> - - + + diff --git a/app/src/main/java/com/xd/androidutils/MainActivity.kt b/app/src/main/java/com/xd/androidutils/MainActivity.kt index 8e4ce02..438a664 100644 --- a/app/src/main/java/com/xd/androidutils/MainActivity.kt +++ b/app/src/main/java/com/xd/androidutils/MainActivity.kt @@ -1,13 +1,8 @@ package com.xd.androidutils import android.os.Bundle -import android.view.Gravity import androidx.appcompat.app.AppCompatActivity import com.xihad.androidutils.AndroidUtils -import com.xihad.androidutils.effect.ClickEffect -import com.xihad.androidutils.effect.applyClickEffect -import com.xihad.androidutils.ext.KotlinExtensionFunctions.printToLog -import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -27,66 +22,66 @@ class MainActivity : AppCompatActivity() { AndroidUtils.toast(this, xd) - toast.setOnClickListener { - AndroidUtils.toast(this, "show something") - } - - showSnack.setOnClickListener { - AndroidUtils.getSnackBar(this).snackBar("show something") - } - - showSnackSuccess.setOnClickListener { - AndroidUtils.getSnackBar(this).successSnack(root, "show something") - } - - showSnackInfo.setOnClickListener { - AndroidUtils.getSnackBar(this).infoSnack(root, "show something", Gravity.BOTTOM, fun() { - AndroidUtils.toast(this, "click") - }) - } - - showSnackWarning.setOnClickListener { - AndroidUtils.getSnackBar(this).warningSnack(root, "show something") - } - - showSnackError.setOnClickListener { - AndroidUtils.getSnackBar(this).errorSnack(root, "show something") - } - - - playTapSound.setOnClickListener { - AndroidUtils.getMediaPlayer().playClickSound(this) - } - - - startMediaPlayer.setOnClickListener { - // AndroidUtils.startMediaPlayer() - } - stopMediaPlayer.setOnClickListener { - // AndroidUtils.stopMediaPlayer() - } - - showKeyboard.setOnClickListener { - // AndroidUtils.showKeyboard() - } - - startNextActivity.setOnClickListener { - AndroidUtils.getIntent().startNextActivity(this, SecondActivity::class.java) - } - - afterNextActivity.setOnClickListener { - AndroidUtils.getIntent().afterNextActivity(this, 2000, SecondActivity::class.java) - } - - startFacebookIntent.setOnClickListener { - AndroidUtils.getIntent().startFacebookIntent(this, "url") - } - - isInternetAvailable.setOnClickListener { - if (AndroidUtils.getAppUtil().isInternetAvailable(this)) { - AndroidUtils.toast(this, "Available") - } - } +// toast.setOnClickListener { +// AndroidUtils.toast(this, "show something") +// } +// +// showSnack.setOnClickListener { +// AndroidUtils.getSnackBar(this).snackBar("show something") +// } +// +// showSnackSuccess.setOnClickListener { +// AndroidUtils.getSnackBar(this).successSnack(root, "show something") +// } +// +// showSnackInfo.setOnClickListener { +// AndroidUtils.getSnackBar(this).infoSnack(root, "show something", Gravity.BOTTOM, fun() { +// AndroidUtils.toast(this, "click") +// }) +// } +// +// showSnackWarning.setOnClickListener { +// AndroidUtils.getSnackBar(this).warningSnack(root, "show something") +// } +// +// showSnackError.setOnClickListener { +// AndroidUtils.getSnackBar(this).errorSnack(root, "show something") +// } +// +// +// playTapSound.setOnClickListener { +// AndroidUtils.getMediaPlayer().playClickSound(this) +// } +// +// +// startMediaPlayer.setOnClickListener { +// // AndroidUtils.startMediaPlayer() +// } +// stopMediaPlayer.setOnClickListener { +// // AndroidUtils.stopMediaPlayer() +// } +// +// showKeyboard.setOnClickListener { +// // AndroidUtils.showKeyboard() +// } +// +// startNextActivity.setOnClickListener { +// AndroidUtils.getIntent().startNextActivity(this, SecondActivity::class.java) +// } +// +// afterNextActivity.setOnClickListener { +// AndroidUtils.getIntent().afterNextActivity(this, 2000, SecondActivity::class.java) +// } +// +// startFacebookIntent.setOnClickListener { +// AndroidUtils.getIntent().startFacebookIntent(this, "url") +// } +// +// isInternetAvailable.setOnClickListener { +// if (AndroidUtils.getAppUtil().isInternetAvailable(this)) { +// AndroidUtils.toast(this, "Available") +// } +// } } diff --git a/build.gradle b/build.gradle index 79d9b15..f68b597 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.4.32" + ext.kotlin_version = "1.8.0" repositories { google() jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.1.1" + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a01b133..abaf103 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jun 28 20:51:32 BDT 2021 +#Tue Oct 31 17:06:57 BDT 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip