Skip to content

Commit

Permalink
Jetpack Compose integration + AGP Upgrade + Kotlin Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
baronhsieh2005 committed Oct 7, 2024
1 parent 1a368dd commit 0aa8fbc
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 13 deletions.
39 changes: 35 additions & 4 deletions PennMobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ android {
buildTypes {
debug {
matchingFallbacks = ['qa', 'release']
testCoverageEnabled true
enableUnitTestCoverage true
enableAndroidTestCoverage true
}
release {}
}
compileSdk 34
buildFeatures {
viewBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}
kotlinOptions {
jvmTarget = "1.8"
}
defaultConfig {
minSdkVersion 26
Expand All @@ -34,9 +42,10 @@ android {
buildConfigField ("String", "PLATFORM_CLIENT_ID", getPlatformClientID())
}
packagingOptions {
pickFirst 'META-INF/LICENSE.txt'
pickFirst 'META-INF/NOTICE.txt'
exclude 'META-INF/rxjava.properties'
resources {
excludes += ['META-INF/rxjava.properties']
pickFirsts += ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt']
}
}
}

Expand Down Expand Up @@ -100,6 +109,28 @@ dependencies {
implementation 'org.jsoup:jsoup:1.16.2'
implementation("com.google.firebase:firebase-crashlytics")

def composeBom = platform("androidx.compose:compose-bom:2024.09.03")
implementation composeBom
testImplementation composeBom
androidTestImplementation composeBom

implementation 'androidx.compose.material3:material3-android'
implementation 'androidx.compose.runtime:runtime'
implementation 'androidx.compose.runtime:runtime-rxjava2'
implementation 'androidx.compose.runtime:runtime-livedata'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.6'
implementation 'androidx.compose.ui:ui-tooling-preview'
debugImplementation 'androidx.compose.ui:ui-tooling'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
implementation 'androidx.compose.material:material-icons-core'
implementation 'androidx.compose.material:material-icons-extended'
implementation 'androidx.activity:activity-compose:1.8.0'

implementation "androidx.glance:glance-appwidget:1.1.0"
implementation "androidx.glance:glance-material3:1.1.0"
implementation "androidx.glance:glance-material:1.1.0"

implementation(platform("com.google.firebase:firebase-bom:31.5.0"))

testImplementation 'junit:junit:4.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SupportFragment : ListFragment() {
savedInstanceState: Bundle?,
): View? {
val view = inflater.inflate(R.layout.fragment_support, container, false)
setHasOptionsMenu(false)
setHasOptionsMenu(true)
return view
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ internal open class ExpandableItemViewController(
itemView,
object : AccessibilityDelegateCompat() {
override fun onInitializeAccessibilityNodeInfo(
host: View?,
info: AccessibilityNodeInfoCompat?,
host: View,
info: AccessibilityNodeInfoCompat,
) {
info?.setTraversalAfter(prev?.itemView)
info?.setTraversalBefore(next?.itemView)
info.setTraversalAfter(prev?.itemView)
info.setTraversalBefore(next?.itemView)
super.onInitializeAccessibilityNodeInfo(host, info)
}
},
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.22' apply false
id 'com.android.application' version '8.6.1' apply false
id 'com.android.library' version '8.6.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.24' apply false
id 'com.google.gms.google-services' version "4.4.0" apply false
id("com.google.firebase.crashlytics") version "2.9.9" apply false
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Dec 01 16:55:01 EST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 0aa8fbc

Please sign in to comment.