Skip to content

Commit

Permalink
version update
Browse files Browse the repository at this point in the history
  • Loading branch information
ziadulislam committed Oct 31, 2023
1 parent 6cd5b0b commit d443181
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions androidutils/build.gradle
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,5 @@ object AppUtil {
}


fun deleteCache(context: Context) {
context.cacheDir.deleteRecursively()
}

fun Context.deleteCache() {
this.cacheDir.deleteRecursively()
}


}
19 changes: 9 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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'

}
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AndroidUtils">
<activity android:name=".SecondActivity"></activity>
<activity android:name=".MainActivity">
<activity android:name=".SecondActivity" />
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
125 changes: 60 additions & 65 deletions app/src/main/java/com/xd/androidutils/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -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?) {
Expand All @@ -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")
// }
// }


}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d443181

Please sign in to comment.