Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit e595b45

Browse files
author
Pavel Skala
committed
Update versions, remove wrong javadoc, fix readme
1 parent d69cbaa commit e595b45

16 files changed

Lines changed: 48 additions & 78 deletions

File tree

app/build.gradle

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 25
6-
buildToolsVersion "25.0.2"
5+
compileSdkVersion 27
6+
buildToolsVersion "27.0.3"
77

88
defaultConfig {
99
applicationId "com.ackee.versionupdatehandler"
1010
minSdkVersion 15
11-
targetSdkVersion 25
11+
targetSdkVersion 27
1212
versionCode 1
1313
versionName "1.0"
1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -31,22 +31,23 @@ android {
3131
}
3232

3333
ext {
34-
ankoVersion = "0.9"
34+
ankoVersion = "0.10.4"
3535
}
3636

3737
dependencies {
38-
compile fileTree(dir: 'libs', include: ['*.jar'])
39-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
38+
implementation fileTree(dir: 'libs', include: ['*.jar'])
39+
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
4040
exclude group: 'com.android.support', module: 'support-annotations'
4141
})
42-
compile 'com.android.support:appcompat-v7:25.1.0'
43-
testCompile 'junit:junit:4.12'
44-
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
42+
implementation 'com.android.support:appcompat-v7:27.1.1'
43+
testImplementation 'junit:junit:4.12'
44+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
45+
4546
// Anko
46-
compile "org.jetbrains.anko:anko-sdk15:$ankoVersion" // So here it's 15 too
47+
implementation "org.jetbrains.anko:anko-sdk15:$ankoVersion" // So here it's 15 too
4748

4849
// Anko libs matching support libs
49-
compile "org.jetbrains.anko:anko-appcompat-v7:${ankoVersion}"
50+
implementation "org.jetbrains.anko:anko-appcompat-v7:${ankoVersion}"
5051

51-
compile project(":library")
52+
implementation project(":library")
5253
}

app/src/main/java/com/ackee/versionupdatehandler/setup/MainActivity.kt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,25 @@ import com.ackee.versioupdatehandler.model.DialogSettings
99
import com.ackee.versioupdatehandler.model.VersionStatus
1010
import io.reactivex.Single
1111
import org.jetbrains.anko.*
12-
import java.util.*
12+
import java.util.Random
1313

1414
/**
1515
* Activity with samples
16-
17-
* @author David Bilik [[email protected]]
18-
* @since 07/02/2017
19-
**/
16+
*/
2017
class MainActivity : AppCompatActivity() {
18+
2119
companion object {
2220
val TAG: String = MainActivity::class.java.name
2321
}
2422

25-
2623
override fun onCreate(savedInstanceState: Bundle?) {
2724
super.onCreate(savedInstanceState)
2825
scrollView {
2926
verticalLayout {
3027
padding = dip(16)
3128
button {
3229
text = "Not mandatory update"
33-
onClick {
30+
setOnClickListener {
3431
checkWithVersion(13)
3532
}
3633
}.lparams(width = matchParent) {
@@ -39,7 +36,7 @@ class MainActivity : AppCompatActivity() {
3936

4037
button {
4138
text = "Mandatory update"
42-
onClick {
39+
setOnClickListener {
4340
checkWithVersion(8)
4441
}
4542
}.lparams(width = matchParent) {
@@ -48,7 +45,7 @@ class MainActivity : AppCompatActivity() {
4845

4946
button {
5047
text = "Customized dialog"
51-
onClick {
48+
setOnClickListener {
5249
VersionStatusResolver({
5350
Single.just(BasicVersionsConfiguration(10, 15))
5451
}).checkVersionStatusAndOpenDefault(8, supportFragmentManager, DialogSettings.Builder()
@@ -65,7 +62,7 @@ class MainActivity : AppCompatActivity() {
6562

6663
button {
6764
text = "Custom UI"
68-
onClick {
65+
setOnClickListener {
6966
VersionStatusResolver({
7067
Single.just(BasicVersionsConfiguration(10, 15))
7168
}).checkVersionStatus(if (Random().nextInt() % 2 == 0) 8 else 12)

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.0.6'
4+
ext.kotlin_version = '1.2.40'
55

66
repositories {
77
jcenter()

firebase-fetcher/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
4+
compileSdkVersion 27
5+
buildToolsVersion "27.0.3"
66

77
defaultConfig {
88
minSdkVersion 15
9-
targetSdkVersion 25
9+
targetSdkVersion 27
1010
versionCode 1
1111
versionName "1.0"
1212
}
@@ -19,9 +19,9 @@ android {
1919
}
2020

2121
dependencies {
22-
testCompile 'junit:junit:4.12'
23-
compile 'com.google.firebase:firebase-config:10.0.0'
24-
compile project(":library")
22+
testImplementation 'junit:junit:4.12'
23+
implementation 'com.google.firebase:firebase-config:15.0.0'
24+
implementation project(':library')
2525
}
2626

2727
ext {

firebase-fetcher/src/main/java/com/ackee/versionupdatehandler/FirebaseVersionFetcher.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.ackee.versionupdatehandler;
22

33
import android.support.annotation.NonNull;
4-
import android.util.Log;
54

65
import com.ackee.versioupdatehandler.VersionFetcher;
76
import com.ackee.versioupdatehandler.model.BasicVersionsConfiguration;
@@ -15,14 +14,11 @@
1514
import io.reactivex.SingleEmitter;
1615
import io.reactivex.SingleOnSubscribe;
1716

18-
1917
/**
2018
* Class that fetches version configuration from Firebase Remote.
21-
*
22-
* @author Georgiy Shur ([email protected])
23-
* @since 2/5/2017
2419
*/
2520
public class FirebaseVersionFetcher implements VersionFetcher {
21+
2622
public static final String TAG = FirebaseVersionFetcher.class.getName();
2723

2824
public static final String MINIMAL_VERSION = "minimal_version_android";

library/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
4+
compileSdkVersion 27
5+
buildToolsVersion "27.0.3"
66

77
defaultConfig {
88
minSdkVersion 15
9-
targetSdkVersion 25
9+
targetSdkVersion 27
1010
versionCode 1
1111
versionName "1.0"
1212

@@ -25,10 +25,10 @@ android {
2525
}
2626

2727
dependencies {
28-
testCompile 'junit:junit:4.12'
29-
compile 'com.android.support:appcompat-v7:25.1.1'
30-
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
31-
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
28+
testImplementation 'junit:junit:4.12'
29+
implementation 'com.android.support:appcompat-v7:27.1.1'
30+
api 'io.reactivex.rxjava2:rxjava:2.1.12'
31+
api 'io.reactivex.rxjava2:rxandroid:2.0.2'
3232
}
3333

3434
ext {

library/src/main/java/com/ackee/versioupdatehandler/UpdateDialog.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
* Dialog indicating that user should update application.
1616
* <p>
1717
* Texts and package name are customizable via {@link DialogSettings} class
18-
*
19-
* @author David Bilik [[email protected]]
20-
* @since 07/02/2017
2118
**/
2219
public class UpdateDialog extends DialogFragment {
2320

library/src/main/java/com/ackee/versioupdatehandler/VersionFetcher.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
/**
99
* Base interface for classes that will handle version fetching.
10-
*
11-
* @author Georgiy Shur ([email protected])
12-
* @since 2/5/2017
1310
*/
1411
public interface VersionFetcher {
1512
public static final String TAG = VersionFetcher.class.getName();

library/src/main/java/com/ackee/versioupdatehandler/VersionStatusResolver.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
/**
1818
* Class that contains the version comparing and update handling logic.
19-
*
20-
* @author Georgiy Shur ([email protected])
21-
* @since 2/5/2017
2219
*/
2320
public class VersionStatusResolver {
2421
public static final String TAG = VersionStatusResolver.class.getName();

library/src/main/java/com/ackee/versioupdatehandler/model/BasicVersionsConfiguration.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
/**
44
* Basic class for versions configuration.
5-
*
6-
* @author Georgiy Shur ([email protected])
7-
* @since 2/5/2017
85
*/
96
public class BasicVersionsConfiguration implements VersionsConfiguration {
107
public static final String TAG = BasicVersionsConfiguration.class.getName();

0 commit comments

Comments
 (0)