Skip to content

Commit d017ac9

Browse files
authored
Merge pull request #14 from indrih17/landscape-fix
Updated Kotlin version to 1.3.21, Gradle 5.2, migration to androidx. …
2 parents 73b4d30 + 9da727d commit d017ac9

File tree

18 files changed

+159
-119
lines changed

18 files changed

+159
-119
lines changed

.idea/misc.xml

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
33
//apply from: "$rootDir/jacoco.gradle"
44

55
android {
6-
compileSdkVersion 27
7-
buildToolsVersion "27.0.3"
6+
compileSdkVersion 28
7+
buildToolsVersion "28.0.3"
88
defaultConfig {
99
applicationId "ru.whalemare.bottomsheet"
1010
minSdkVersion 16
11-
targetSdkVersion 27
11+
targetSdkVersion 28
1212
versionCode 1
1313
versionName app_version
1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -30,16 +30,16 @@ dependencies {
3030
implementation fileTree(dir: 'libs', include: ['*.jar'])
3131
implementation project(path: ':sheetmenu')
3232
// implementation 'com.github.whalemare:sheetmenu:1.3.5'
33-
implementation "com.android.support:appcompat-v7:$supportVersion"
34-
implementation "com.android.support:recyclerview-v7:$supportVersion"
35-
implementation "com.android.support.constraint:constraint-layout:1.1.0"
33+
implementation "androidx.appcompat:appcompat:$supportAppcompatVersion"
34+
implementation "androidx.constraintlayout:constraintlayout:2.0.0-alpha3"
35+
implementation "androidx.recyclerview:recyclerview:$supportVersion"
3636
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3737

38-
testCompile 'junit:junit:4.12'
39-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
38+
testImplementation 'junit:junit:4.12'
39+
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
4040
exclude group: 'com.android.support', module: 'support-annotations'
4141
})
42-
androidTestCompile 'junit:junit:4.12'
42+
androidTestImplementation 'junit:junit:4.12'
4343
}
4444
repositories {
4545
mavenCentral()

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="ru.whalemare.bottomsheet">
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="ru.whalemare.bottomsheet">
45

56
<application
67
android:allowBackup="true"
78
android:icon="@mipmap/ic_launcher"
89
android:label="@string/app_name"
910
android:roundIcon="@mipmap/ic_launcher_round"
1011
android:supportsRtl="true"
11-
android:theme="@style/AppTheme">
12+
android:theme="@style/AppTheme"
13+
tools:ignore="GoogleAppIndexingWarning">
1214
<activity android:name=".MainActivity">
1315
</activity>
1416
<activity android:name=".MainActivityKotlin">

app/src/main/java/ru/whalemare/bottomsheet/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package ru.whalemare.bottomsheet;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
54
import android.view.MenuItem;
65
import android.view.View;
76

7+
import androidx.appcompat.app.AppCompatActivity;
88
import ru.whalemare.sheetmenu.SheetMenu;
99

1010
public class MainActivity extends AppCompatActivity {

app/src/main/java/ru/whalemare/bottomsheet/MainActivityKotlin.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package ru.whalemare.bottomsheet
22

33
import android.content.Context
44
import android.os.Bundle
5-
import android.support.v7.app.AppCompatActivity
6-
import android.support.v7.widget.GridLayoutManager
75
import android.view.MenuItem
86
import android.view.View
97
import android.widget.CheckBox
108
import android.widget.Toast
9+
import androidx.appcompat.app.AppCompatActivity
10+
import androidx.recyclerview.widget.GridLayoutManager
1111
import ru.whalemare.sheetmenu.SheetMenu
1212

1313
open class MainActivityKotlin : AppCompatActivity() {
@@ -26,13 +26,13 @@ open class MainActivityKotlin : AppCompatActivity() {
2626
(findViewById<CheckBox>(R.id.checkbox_icons))
2727
.setOnCheckedChangeListener { _, isChecked -> needIcons = isChecked }
2828

29-
findViewById<View>(R.id.button_linear).setOnClickListener({
29+
findViewById<View>(R.id.button_linear).setOnClickListener {
3030
setupLinear()
31-
})
31+
}
3232

33-
findViewById<View>(R.id.button_grid).setOnClickListener({
33+
findViewById<View>(R.id.button_grid).setOnClickListener {
3434
setupGrid()
35-
})
35+
}
3636
}
3737

3838
fun setupLinear() {

app/src/main/res/layout/activity_main.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout
2+
<androidx.constraintlayout.widget.ConstraintLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -8,7 +8,7 @@
88
android:background="#4f4f4f"
99
tools:context="ru.whalemare.bottomsheet.MainActivity">
1010

11-
<android.support.v7.widget.AppCompatCheckBox
11+
<androidx.appcompat.widget.AppCompatCheckBox
1212
android:id="@+id/checkbox_title"
1313
android:layout_width="wrap_content"
1414
android:layout_height="wrap_content"
@@ -23,7 +23,7 @@
2323
app:layout_constraintTop_toTopOf="parent"/>
2424

2525

26-
<android.support.v7.widget.AppCompatCheckBox
26+
<androidx.appcompat.widget.AppCompatCheckBox
2727
android:id="@+id/checkbox_icons"
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
@@ -75,4 +75,4 @@
7575
app:layout_constraintTop_toBottomOf="@+id/checkbox_title"
7676
app:layout_constraintVertical_bias="0.32"/>
7777

78-
</android.support.constraint.ConstraintLayout>
78+
</androidx.constraintlayout.widget.ConstraintLayout>

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
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.2.41'
4+
ext.kotlin_version = '1.3.21'
55
ext.app_version = "1.3.6"
6-
ext.supportVersion = "27.1.1"
6+
ext.supportVersion = "1.0.0"
7+
ext.supportAppcompatVersion = "1.0.2"
78
repositories {
89
jcenter()
910
google()
1011
}
1112
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.1.2'
13+
classpath 'com.android.tools.build:gradle:3.3.2'
1314
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
15+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1516
// NOTE: Do not place your application dependencies here; they belong
1617
// in the individual module build.gradle files
1718
}

gradle/wrapper/gradle-wrapper.jar

1.92 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri May 04 18:56:38 NOVT 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)