Skip to content

Commit

Permalink
Use AndroidX in the sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed Dec 23, 2018
1 parent f01e70d commit 4587bac
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Usage
```groovy
dependencies {
/* ... */
annotationProcessor 'org.jraf:prefs-compiler:1.3.0' // or kapt if you use Kotlin
implementation 'org.jraf:prefs:1.3.0'
annotationProcessor 'org.jraf:prefs-compiler:1.4.0' // or kapt if you use Kotlin
implementation 'org.jraf:prefs:1.4.0'
}
```

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
org.gradle.parallel=true
# Enable build cache
org.gradle.caching=true
# Use AndroidX
android.useAndroidX=true
android.enableJetifier=true
6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ android {

dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.10'
implementation "com.android.support:appcompat-v7:28.0.0"
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'android.arch.lifecycle:livedata:1.1.1'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata:2.0.0'

kapt project(':prefs-compiler')
implementation project(':prefs')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
*/
package org.jraf.android.prefs.sample.app

import android.arch.lifecycle.Observer
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Observer
import org.jraf.android.prefs.sample.R
import org.jraf.android.prefs.sample.prefs.MainPrefs
import org.jraf.android.prefs.sample.prefs.SettingsPrefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.jraf.android.prefs.Prefs
*/
@Prefs(
generateGetLiveData = true,
useAndroidX = false
useAndroidX = true
)
class Main {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.jraf.android.prefs.Prefs
@Prefs(
fileName = "settings",
fileMode = Context.MODE_PRIVATE,
useAndroidX = false
useAndroidX = true
)
class Settings {
@DefaultInt(-0x44ff23)
Expand Down

0 comments on commit 4587bac

Please sign in to comment.