Skip to content

Commit 1d7e799

Browse files
committed
Latest build
1 parent 06a0fbf commit 1d7e799

File tree

12 files changed

+220
-156
lines changed

12 files changed

+220
-156
lines changed

.jitpack.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jdk: openjdk11

.travis.yml

-11
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ See the sample app for more.
7878
License
7979
--------
8080

81-
Copyright 2020 Commit 451
81+
Copyright 2022 Commit 451
8282

8383
Licensed under the Apache License, Version 2.0 (the "License");
8484
you may not use this file except in compliance with the License.

app/build.gradle

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
apply plugin: 'com.android.application'
2-
3-
apply plugin: 'kotlin-android'
4-
5-
apply plugin: 'kotlin-android-extensions'
1+
apply plugin: "com.android.application"
2+
apply plugin: "kotlin-android"
63

74
android {
8-
compileSdkVersion 30
5+
compileSdkVersion 32
96
defaultConfig {
107
applicationId "com.commit451.modalbottomsheetdialogfragment.sample"
118
minSdkVersion 16
12-
targetSdkVersion 30
9+
targetSdkVersion 32
1310
versionCode 1
1411
versionName "1.0"
1512
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1613
}
14+
buildFeatures {
15+
viewBinding true
16+
}
1717
buildTypes {
1818
release {
1919
minifyEnabled false
20-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
2121
}
2222
}
2323
}
2424

2525
dependencies {
26-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27-
28-
implementation "androidx.appcompat:appcompat:1.2.0"
26+
implementation "androidx.appcompat:appcompat:1.4.1"
2927

30-
implementation project(':modalbottomsheetdialogfragment')
28+
implementation project(":modalbottomsheetdialogfragment")
3129
}

app/src/main/AndroidManifest.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
12+
<activity
13+
android:name=".MainActivity"
14+
android:exported="true">
1315
<intent-filter>
1416
<action android:name="android.intent.action.MAIN" />
1517

app/src/main/java/com/commit451/modalbottomsheetdialogfragment/sample/MainActivity.kt

+10-7
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,33 @@ import androidx.appcompat.app.AppCompatActivity
55
import com.commit451.modalbottomsheetdialogfragment.ModalBottomSheetDialogFragment
66
import com.commit451.modalbottomsheetdialogfragment.Option
77
import com.commit451.modalbottomsheetdialogfragment.OptionRequest
8+
import com.commit451.modalbottomsheetdialogfragment.sample.databinding.ActivityMainBinding
89
import com.google.android.material.snackbar.Snackbar
9-
import kotlinx.android.synthetic.main.activity_main.*
1010

1111
class MainActivity : AppCompatActivity(), ModalBottomSheetDialogFragment.Listener {
1212

13+
private lateinit var binding: ActivityMainBinding
14+
1315
override fun onCreate(savedInstanceState: Bundle?) {
1416
super.onCreate(savedInstanceState)
15-
setContentView(R.layout.activity_main)
17+
binding = ActivityMainBinding.inflate(layoutInflater)
18+
setContentView(binding.root)
1619

17-
buttonShow.setOnClickListener {
20+
binding.buttonShow.setOnClickListener {
1821
ModalBottomSheetDialogFragment.Builder()
1922
.add(R.menu.options)
2023
.add(OptionRequest(123, "Custom", R.drawable.ic_bluetooth_black_24dp))
2124
.show(supportFragmentManager, "HI")
2225
}
2326

24-
buttonShowWithHeader.setOnClickListener {
27+
binding.buttonShowWithHeader.setOnClickListener {
2528
ModalBottomSheetDialogFragment.Builder()
2629
.add(R.menu.option_lots)
2730
.header("Neat")
2831
.show(supportFragmentManager, "HI")
2932
}
3033

31-
buttonCustom.setOnClickListener {
34+
binding.buttonCustom.setOnClickListener {
3235
ModalBottomSheetDialogFragment.Builder()
3336
.add(R.menu.option_lots)
3437
.layout(R.layout.item_custom)
@@ -37,7 +40,7 @@ class MainActivity : AppCompatActivity(), ModalBottomSheetDialogFragment.Listene
3740
.show(supportFragmentManager, "HI")
3841
}
3942

40-
buttonOrder.setOnClickListener {
43+
binding.buttonOrder.setOnClickListener {
4144
ModalBottomSheetDialogFragment.Builder()
4245
.add(R.menu.options)
4346
.add(OptionRequest(123, "Custom", R.drawable.ic_bluetooth_black_24dp))
@@ -47,7 +50,7 @@ class MainActivity : AppCompatActivity(), ModalBottomSheetDialogFragment.Listene
4750
}
4851

4952
override fun onModalOptionSelected(tag: String?, option: Option) {
50-
Snackbar.make(root, "Selected option ${option.title} from tag $tag", Snackbar.LENGTH_SHORT)
53+
Snackbar.make(binding.root, "Selected option ${option.title} from tag $tag", Snackbar.LENGTH_SHORT)
5154
.show()
5255
}
5356

build.gradle

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
buildscript {
2-
ext.kotlin_version = '1.4.10'
2+
ext.kotlin_version = "1.6.10"
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.0.1'
8+
classpath "com.android.tools.build:gradle:7.1.1"
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
10+
classpath "com.vanniktech:gradle-maven-publish-plugin:0.18.0"
1111
}
1212
}
1313

14+
plugins {
15+
id "com.github.ben-manes.versions" version "0.42.0"
16+
}
17+
1418
allprojects {
1519
repositories {
1620
google()
17-
jcenter()
21+
mavenCentral()
1822
}
1923
}
2024

gradle.properties

+23
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,26 @@ org.gradle.jvmargs=-Xmx1536m
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
1818
android.useAndroidX=true
19+
20+
GROUP=com.commit451.modalbottomsheetdialogfragment
21+
POM_ARTIFACT_ID=modalbottomsheetdialogfragment
22+
VERSION_NAME=1.0.0
23+
24+
POM_NAME=Aloy
25+
POM_DESCRIPTION=Modal bottom sheet dialog based on the Material Guidelines
26+
POM_INCEPTION_YEAR=2018
27+
POM_URL=https://github.com/Commit451/ModalBottomSheetDialogFragment/
28+
29+
POM_LICENSE_NAME=The Apache Software License, Version 2.0
30+
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
31+
POM_LICENSE_DIST=repo
32+
33+
POM_SCM_URL=https://github.com/Commit451/Aloy/
34+
POM_SCM_CONNECTION=scm:git:git://github.com/Commit451/ModalBottomSheetDialogFragment.git
35+
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/Commit451/ModalBottomSheetDialogFragment.git
36+
37+
POM_DEVELOPER_ID=Commit451
38+
POM_DEVELOPER_NAME=Commit 451
39+
POM_DEVELOPER_URL=https://github.com/Commit451/
40+
41+
RELEASE_SIGNING_ENABLED=false

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)