Skip to content

Commit

Permalink
Upgrade compose lib to release version
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonchan committed Nov 15, 2023
1 parent b037b5b commit 1ac908f
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 51 deletions.
1 change: 1 addition & 0 deletions .idea/.name

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

123 changes: 123 additions & 0 deletions .idea/codeStyles/Project.xml

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

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

17 changes: 5 additions & 12 deletions .idea/deploymentTargetDropDown.xml

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

3 changes: 1 addition & 2 deletions .idea/gradle.xml

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

5 changes: 5 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

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

3 changes: 1 addition & 2 deletions .idea/misc.xml

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

74 changes: 46 additions & 28 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ plugins {
}

android {
compileSdk 31
buildToolsVersion "30.0.3"
compileSdk 34

defaultConfig {
applicationId "com.ellison.flappybird"
minSdk 23
targetSdk 31
targetSdk 34
versionCode 2
versionName "1.1"

Expand All @@ -32,7 +31,6 @@ android {
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
buildFeatures {
compose true
Expand All @@ -41,34 +39,54 @@ android {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion '1.4.32'
}
namespace 'com.ellison.flappybird'
}

dependencies {
dependencies {
implementation 'com.google.android.material:material:1.3.0'
def composeBom = platform('androidx.compose:compose-bom:2023.09.01')
implementation composeBom

implementation 'androidx.compose.ui:ui:1.0.0-beta07'
// Tooling support (Previews, etc.)
implementation 'androidx.compose.ui:ui-tooling:1.0.0-beta07'
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation 'androidx.compose.foundation:foundation:1.0.0-beta07'
// Material Design
implementation 'androidx.compose.material:material:1.0.0-beta07'
// Material design icons
implementation 'androidx.compose.material:material-icons-core:1.0.0-beta07'
implementation 'androidx.compose.material:material-icons-extended:1.0.0-beta07'
// Integration with activities
implementation 'androidx.activity:activity-compose:1.3.0-alpha08'
// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05'
// Integration with observables
implementation 'androidx.compose.runtime:runtime-livedata:1.0.0-beta07'
implementation 'androidx.compose.runtime:runtime-rxjava2:1.0.0-beta07'
implementation 'com.google.android.material:material:1.3.0'

// UI Tests
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.0.0-beta07'
implementation 'androidx.compose.ui:ui'
// Tooling support (Previews, etc.)
implementation 'androidx.compose.ui:ui-tooling'
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation 'androidx.compose.foundation:foundation'
// Material Design
implementation 'androidx.compose.material:material'
// Material design icons
implementation 'androidx.compose.material:material-icons-core'
implementation 'androidx.compose.material:material-icons-extended'
// Integration with activities
implementation 'androidx.activity:activity-compose:1.7.2'
// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
// Integration with observables
implementation 'androidx.compose.runtime:runtime-livedata:1.5.4'
implementation 'androidx.compose.runtime:runtime-rxjava2:1.5.4'

// Optional - APIs for SplashScreen, including compatibility helpers on devices prior Android 12
implementation "androidx.core:core-splashscreen:1.0.0-alpha01"
}
// implementation 'androidx.compose.ui:ui:1.0.0-beta07'
// // Tooling support (Previews, etc.)
// implementation 'androidx.compose.ui:ui-tooling:1.0.0-beta07'
// // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
// implementation 'androidx.compose.foundation:foundation:1.0.0-beta07'
// // Material Design
// implementation 'androidx.compose.material:material:1.0.0-beta07'
// // Material design icons
// implementation 'androidx.compose.material:material-icons-core:1.0.0-beta07'
// implementation 'androidx.compose.material:material-icons-extended:1.0.0-beta07'
// // Integration with activities
// implementation 'androidx.activity:activity-compose:1.3.0-alpha08'
// // Integration with ViewModels
// implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05'
// // Integration with observables
// implementation 'androidx.compose.runtime:runtime-livedata:1.0.0-beta07'
// implementation 'androidx.compose.runtime:runtime-rxjava2:1.0.0-beta07'

// UI Tests
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.0.0-beta07'

// Optional - APIs for SplashScreen, including compatibility helpers on devices prior Android 12
implementation "androidx.core:core-splashscreen:1.0.0-alpha01"
}
2 changes: 2 additions & 0 deletions app/src/main/java/com/ellison/flappybird/view/GameScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInteropFilter
import androidx.compose.ui.layout.onGloballyPositioned
Expand All @@ -19,6 +20,7 @@ import com.ellison.flappybird.ui.theme.ForegroundEarthYellow
import com.ellison.flappybird.util.LogUtil
import com.ellison.flappybird.viewmodel.GameViewModel

@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun GameScreen(
clickable: Clickable = Clickable()
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.0.0-beta07'
compose_version = '1.5.3'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jul 09 21:58:18 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 1ac908f

Please sign in to comment.