diff --git a/app/build.gradle b/app/build.gradle index 2ca08cb..0deb75e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,14 +10,14 @@ android { versionCode getGitCommitCount() versionName "1.0" - minSdkVersion 21 + minSdkVersion 26 targetSdkVersion 33 buildConfigField "String", 'GIT_REPOSITORY', "\"" + getGitOriginRemote() + "\"" } packagingOptions { resources { - pickFirsts += ['META-INF/atomicfu.kotlin_module'] + pickFirsts += ['META-INF/atomicfu.kotlin_module', 'META-INF/DEPENDENCIES'] } } diff --git a/app/src/main/java/info/hannes/github/sample/MainActivity.kt b/app/src/main/java/info/hannes/github/sample/MainActivity.kt index 2b8c883..b64254f 100644 --- a/app/src/main/java/info/hannes/github/sample/MainActivity.kt +++ b/app/src/main/java/info/hannes/github/sample/MainActivity.kt @@ -27,7 +27,7 @@ class MainActivity : AppCompatActivity() { BuildConfig.GIT_REPOSITORY ) - binding.button.setOnClickListener { + binding.buttonGithub.setOnClickListener { AppUpdateHelper.checkWithDialog( this, BuildConfig.GIT_REPOSITORY, @@ -35,6 +35,15 @@ class MainActivity : AppCompatActivity() { force = true // just to enable debugging, without you can only debug once a day ) } + + binding.buttonArtifactory.setOnClickListener { + AppUpdateHelper.checkArtifactoryDialog( + this, + "https://artifactory.myserver.info", + { msg -> Log.d("result", msg) }, + force = true // just to enable debugging, without you can only debug once a day + ) + } } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 746ee3a..7c09803 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,19 +6,28 @@ android:layout_width="match_parent" android:layout_height="match_parent"> -