Skip to content

Commit

Permalink
Updated compose version and fixed build (#7)
Browse files Browse the repository at this point in the history
- Updated compose version to 1.2.0-beta03
- Updated gradle plugin to 1.6.21 needed to build properly
- Updated Gradle
- Updated dependencies versions to latest ones

Co-authored-by: Dragan Bjedov <[email protected]>
  • Loading branch information
draganbjedov and Dragan Bjedov committed Jun 15, 2022
1 parent aa8bad2 commit 1d60f00
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 24 deletions.
14 changes: 7 additions & 7 deletions ComposePrefs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ plugins {
}

android {
compileSdk 31
compileSdk 32

defaultConfig {
minSdk 21
targetSdk 31
targetSdk 32
versionCode 2
versionName "1.0.4"
versionName "1.0.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -35,13 +35,13 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion "1.2.0-alpha01"
kotlinCompilerExtensionVersion "1.2.0-beta03"
}
}

dependencies {
implementation "androidx.compose.ui:ui:1.2.0-beta02"
implementation "androidx.compose.material:material:1.2.0-beta02"
implementation "androidx.compose.ui:ui:1.2.0-beta03"
implementation "androidx.compose.material:material:1.2.0-beta03"
implementation "androidx.datastore:datastore-preferences:1.0.0"
}

Expand All @@ -54,7 +54,7 @@ afterEvaluate {

groupId = 'com.github.jamalmulla'
artifactId = 'ComposePrefs'
version = '1.0.4'
version = '1.0.5'
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,21 @@ individual parameters of each preference composable to achieve the functionality
something is missing, please create an Issue so we can discuss possible solutions.

# Download

In your `settings.gradle` file add the following
Add `jitpack.io` repository to your root `build.gradle` at the end of repositories:

``` groovy
maven { url "https://jitpack.io" }
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

and in your module `build.gradle` file add the dependencies

``` groovy
implementation "com.github.JamalMulla:ComposePrefs:<version>" // Current is 1.0.4
implementation "com.github.JamalMulla:ComposePrefs:<version>" // Current is 1.0.5
implementation "androidx.datastore:datastore-preferences:1.0.0"
```

Expand Down
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

android {
compileSdk 31
compileSdk 32

defaultConfig {
applicationId "com.jamal.composeprefssample"
minSdk 23
targetSdk 31
targetSdk 32
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -38,7 +38,6 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion '1.5.21'
}
packagingOptions {
resources {
Expand All @@ -49,15 +48,16 @@ android {

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.activity:activity-compose:1.4.0'
testImplementation 'junit:junit:4.+'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "se

@ExperimentalComposeUiApi
@ExperimentalMaterialApi
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterialApi::class)
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
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.2.0-beta02'
compose_version = '1.2.0-beta03'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
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 @@
#Sun Dec 26 19:18:50 GMT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "ComposePrefs Sample"
Expand Down

0 comments on commit 1d60f00

Please sign in to comment.