Skip to content

Commit

Permalink
Merge pull request #14 from indrih17/landscape-fix
Browse files Browse the repository at this point in the history
Updated Kotlin version to 1.3.21, Gradle 5.2, migration to androidx. …
  • Loading branch information
whalemare authored Mar 29, 2019
2 parents 73b4d30 + 9da727d commit d017ac9
Show file tree
Hide file tree
Showing 18 changed files with 159 additions and 119 deletions.
14 changes: 12 additions & 2 deletions .idea/misc.xml

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

3 changes: 3 additions & 0 deletions .idea/modules.xml

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

18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
//apply from: "$rootDir/jacoco.gradle"

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "ru.whalemare.bottomsheet"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName app_version
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -30,16 +30,16 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':sheetmenu')
// implementation 'com.github.whalemare:sheetmenu:1.3.5'
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:recyclerview-v7:$supportVersion"
implementation "com.android.support.constraint:constraint-layout:1.1.0"
implementation "androidx.appcompat:appcompat:$supportAppcompatVersion"
implementation "androidx.constraintlayout:constraintlayout:2.0.0-alpha3"
implementation "androidx.recyclerview:recyclerview:$supportVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testCompile 'junit:junit:4.12'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile 'junit:junit:4.12'
androidTestImplementation 'junit:junit:4.12'
}
repositories {
mavenCentral()
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.whalemare.bottomsheet">
xmlns:tools="http://schemas.android.com/tools"
package="ru.whalemare.bottomsheet">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MainActivity">
</activity>
<activity android:name=".MainActivityKotlin">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ru.whalemare.bottomsheet;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import ru.whalemare.sheetmenu.SheetMenu;

public class MainActivity extends AppCompatActivity {
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/ru/whalemare/bottomsheet/MainActivityKotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package ru.whalemare.bottomsheet

import android.content.Context
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.GridLayoutManager
import android.view.MenuItem
import android.view.View
import android.widget.CheckBox
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import ru.whalemare.sheetmenu.SheetMenu

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

findViewById<View>(R.id.button_linear).setOnClickListener({
findViewById<View>(R.id.button_linear).setOnClickListener {
setupLinear()
})
}

findViewById<View>(R.id.button_grid).setOnClickListener({
findViewById<View>(R.id.button_grid).setOnClickListener {
setupGrid()
})
}
}

fun setupLinear() {
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -8,7 +8,7 @@
android:background="#4f4f4f"
tools:context="ru.whalemare.bottomsheet.MainActivity">

<android.support.v7.widget.AppCompatCheckBox
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/checkbox_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -23,7 +23,7 @@
app:layout_constraintTop_toTopOf="parent"/>


<android.support.v7.widget.AppCompatCheckBox
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/checkbox_icons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -75,4 +75,4 @@
app:layout_constraintTop_toBottomOf="@+id/checkbox_title"
app:layout_constraintVertical_bias="0.32"/>

</android.support.constraint.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.2.41'
ext.kotlin_version = '1.3.21'
ext.app_version = "1.3.6"
ext.supportVersion = "27.1.1"
ext.supportVersion = "1.0.0"
ext.supportAppcompatVersion = "1.0.2"
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri May 04 18:56:38 NOVT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
13 changes: 8 additions & 5 deletions sheetmenu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ sourceCompatibility = 1.7
targetCompatibility = 1.7

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName app_version

Expand All @@ -33,8 +33,11 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:design:$supportVersion"
implementation "androidx.appcompat:appcompat:$supportAppcompatVersion"
implementation "androidx.constraintlayout:constraintlayout:2.0.0-alpha3"
implementation "androidx.recyclerview:recyclerview:$supportVersion"
implementation "com.google.android.material:material:$supportVersion"
implementation "androidx.lifecycle:lifecycle-common:2.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation 'junit:junit:4.12'
Expand Down
Loading

0 comments on commit d017ac9

Please sign in to comment.