Skip to content

Commit

Permalink
Update versions and migrate to kotlin 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Nov 2, 2024
1 parent 3c5f87b commit ab9ac36
Show file tree
Hide file tree
Showing 41 changed files with 618 additions and 440 deletions.
63 changes: 0 additions & 63 deletions app/build.gradle

This file was deleted.

65 changes: 65 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
///*
// * Designed and developed by 2021 skydoves (Jaewoong Eum)
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */

import com.skydoves.bindables.Configuration

plugins {
id(libs.plugins.android.application.get().pluginId)
id(libs.plugins.kotlin.android.get().pluginId)
id(libs.plugins.kotlin.parcelize.get().pluginId)
id(libs.plugins.hilt.plugin.get().pluginId)
id(libs.plugins.ksp.get().pluginId)
}

android {
namespace = "com.skydoves.bindablesdemo"
compileSdk = Configuration.compileSdk
defaultConfig {
applicationId = "com.skydoves.bindablesdemo"
minSdk = Configuration.minSdk
targetSdk = Configuration.targetSdk
versionCode = Configuration.versionCode
versionName = Configuration.versionName
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
}

buildFeatures {
dataBinding = true
}
}

dependencies {
implementation(project(":bindables"))

implementation(libs.hilt.android)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
ksp(libs.hilt.compiler)

implementation(libs.androidx.material)
implementation(libs.androidx.fragment)
implementation(libs.glide)
implementation(libs.whatif)
}
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<application
android:name=".BindableApp"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BindablesDemo">

<activity
android:name=".MainActivity"
android:theme="@style/AppTheme"
android:exported="true">
android:exported="true"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main
override fun onPageScrolled(
position: Int,
positionOffset: Float,
positionOffsetPixels: Int
positionOffsetPixels: Int,
) = Unit

override fun onPageSelected(position: Int) {
binding.mainBottomNavigation.menu.getItem(position).isChecked = true
binding.mainBottomNavigation.menu.findItem(position).isChecked = true
}
}
},
)
}

binding.mainBottomNavigation.setOnNavigationItemSelectedListener {
binding.mainBottomNavigation.setOnItemSelectedListener {
when (it.itemId) {
R.id.action_one -> binding.mainViewpager.currentItem = 0
R.id.action_two -> binding.mainViewpager.currentItem = 1
Expand Down
Loading

0 comments on commit ab9ac36

Please sign in to comment.