Skip to content

Commit

Permalink
migration to androidx
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondeye authored and daely committed Mar 5, 2019
1 parent 1578068 commit 06398ce
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 71 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ buildscript {
// mavenCentral()
}
rootProject.ext.versions = [
kotlin: '1.3.20',
kotlin: '1.3.21',
dokka: '0.9.17'
]

Expand Down
75 changes: 17 additions & 58 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,86 +17,45 @@ ext.versions = [
targetSdk : 28,
compileSdk : 28,
// buildTools : '26.0.2',
kotlin : '1.3.20',
kotlin : '1.3.21',
//https://github.com/Kotlin/kotlinx.coroutines/releases
kotlin_coroutines : '1.1.1',

// UI libs.
//https://developer.android.com/topic/libraries/support-library/revisions.html
supportLibs : '28.0.0',
supportxLibs : '1.0.0', //androidx


//Android architecture components libs
//https://developer.android.com/topic/libraries/architecture/adding-components.html
archLibs : '1.1.1',

// Reactive.
rxJava : '1.3.6',
rxJava2 : '2.1.2',
rxJavaProGuardRules : '1.1.6.0',
rxJavaAsyncUtil : '0.21.0',
rxAndroid : '1.2.1',
rxAndroid2 : '2.0.1',

//dario libs
kjsonpatch : '0.3.21',

// Others.
kovenant : '3.3.0',
//https://github.com/google/gson/releases
gson : '2.8.5',

// Testing.
junit : '4.12',
assertJ : '1.7.1',
mockito : '1.9.5',
robolectric : '3.1.2',
supportTestRunner : '0.4.1',
espresso : '2.2.1',
compileTesting : '0.8',
truth : '0.36',
equalsverifier : '2.0.2'
]

ext.libraries = [
// UI libs. see https://developer.android.com/jetpack/androidx/migrate for migrating to androidx

supportAppCompat : "com.android.support:appcompat-v7:$versions.supportLibs",
supportxCompat : "androidx.core:core:$versions.supportxLibs",

supportCardView : "com.android.support:cardview-v7:$versions.supportLibs",
supportxCardView : "androidx.cardview:cardview:$versions.supportxLibs",

supportDesign : "com.android.support:design:$versions.supportLibs",
supportxDesign : "com.google.android.material:material:$versions.supportxLibs",
supportPercent : "com.android.support:percent:$versions.supportLibs",
supportV13 : "com.android.support:support-v13:$versions.supportLibs",
supportRecyclerView : "com.android.support:recyclerview-v7:$versions.supportLibs",
supportVectorDrawable : "com.android.support:support-vector-drawable:$versions.supportLibs",
supportAnimatedDrawable : "com.android.support:animated-vector-drawable:$versions.supportLibs",
rxBinding : "com.jakewharton.rxbinding:rxbinding:$versions.rxBinding",

supportAppCompat : "androidx.appcompat:appcompat:1.0.0",
//https://developer.android.com/topic/libraries/architecture/adding-components.html
//Android Architecture components
archExtensions : "android.arch.lifecycle:extensions:$versions.archLibs",
archViewModel : "android.arch.lifecycle:viewmodel:$versions.archLibs",
archLivedata : "android.arch.lifecycle:livedata:$versions.archLibs",
archLifecycleRunTime : "android.arch.lifecycle:runtime:$versions.archLibs",
archLifecycleCompiler : "android.arch.lifecycle:compiler:$versions.archLibs",
archExtensions : "androidx.lifecycle:lifecycle-extensions:2.0.0-rc01",

//dario libs
kjsonpatch : "com.github.beyondeye:kjsonpatch:$versions.kjsonpatch",
kjsonpatch : "com.github.beyondeye:kjsonpatch:0.3.21",

// Reactive.
rxJava : "io.reactivex:rxjava:$versions.rxJava",
rxJava2 : "io.reactivex.rxjava2:rxjava:$versions.rxJava2",
rxJavaAsyncUtil : "io.reactivex:rxjava-async-util:$versions.rxJavaAsyncUtil",
rxJavaProGuardRules : "com.artemzin.rxjava:proguard-rules:$versions.rxJavaProGuardRules",
rxAndroid : "io.reactivex:rxandroid:$versions.rxAndroid",
rxAndroid2 : "io.reactivex.rxjava2:rxandroid:$versions.rxAndroid2",
rxJavaAsyncUtil : "io.reactivex:rxjava-async-util:0.21.0",
rxJavaProGuardRules : "com.artemzin.rxjava:proguard-rules:1.1.6.0",
rxAndroid : "io.reactivex:rxandroid:1.2.1",
rxAndroid2 : "io.reactivex.rxjava2:rxandroid:2.0.1",

// Others.
gson : "com.google.code.gson:gson:$versions.gson",
//https://github.com/google/gson/releases
gson : "com.google.code.gson:gson:2.8.5",
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin",
kotlinCoroutinesCore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.kotlin_coroutines",
kotlinCoroutinesAndroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.kotlin_coroutines",
Expand All @@ -105,17 +64,17 @@ ext.libraries = [
kovenantAndroid : "nl.komponents.kovenant:kovenant-android:$versions.kovenant",

// Testing.
junit : "junit:junit:$versions.junit",
assertJ : "org.assertj:assertj-core:$versions.assertJ",
mockito : "org.mockito:mockito-core:$versions.mockito",
junit : "junit:junit:4.12",
assertJ : "org.assertj:assertj-core:1.7.1",
mockito : "org.mockito:mockito-core:1.9.5",
robolectric : "org.robolectric:robolectric:$versions.robolectric",
robolectricMultiDex : "org.robolectric:shadows-multidex:$versions.robolectric",
supportTestRunner : "com.android.support.test:runner:$versions.supportTestRunner",
supportTestRules : "com.android.support.test:rules:$versions.supportTestRunner",
espressoCore : "com.android.support.test.espresso:espresso-core:$versions.espresso",
espressoContrib : "com.android.support.test.espresso:espresso-contrib:$versions.espresso",
mockWebserver : "com.squareup.okhttp:mockwebserver:$versions.okHttp",
compileTesting : "com.google.testing.compile:compile-testing:$versions.compileTesting",
truth : "com.google.truth:truth:$versions.truth",
equalsverifier : "nl.jqno.equalsverifier:equalsverifier:$versions.equalsverifier"
compileTesting : "com.google.testing.compile:compile-testing:0.8",
truth : "com.google.truth:truth:0.36",
equalsverifier : "nl.jqno.equalsverifier:equalsverifier:2.0.2"
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
Expand Down
1 change: 1 addition & 0 deletions example/counter-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
}
}
Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#see https://developer.android.com/jetpack/androidx/migrate
#I need jetifier enabled because coroutine android use support annotations
# see https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/kotlinx-coroutines-android/build.gradle
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048M
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.beyondeye.reduksAndroid.activity

import android.arch.lifecycle.ViewModel
import android.arch.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProviders
import android.os.Bundle
import android.os.Parcelable
import android.support.v4.app.FragmentActivity
import androidx.fragment.app.FragmentActivity
import com.beyondeye.reduks.Action
import com.beyondeye.reduks.ReducerFn
import com.beyondeye.reduks.Reduks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.beyondeye.reduksAndroid.activity

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import com.beyondeye.reduks.*
import com.beyondeye.reduksAndroid.activity.ActionRestoreState
import com.beyondeye.reduksAndroid.activity.ReduksActivity


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.beyondeye.reduksAndroid.fragment

import android.support.v4.app.Fragment
import androidx.fragment.app.Fragment
import com.beyondeye.reduks.*
import com.beyondeye.reduks.bus.*
import com.beyondeye.reduks.modules.MultiStore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.beyondeye.reduks.experimental.activity

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import com.beyondeye.reduks.*
import com.beyondeye.reduks.bus.BusStore
import com.beyondeye.reduks.experimental.AsyncStore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.beyondeye.reduks.activity

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import com.beyondeye.reduks.*
import com.beyondeye.reduksAndroid.activity.ActionRestoreState
import com.beyondeye.reduksAndroid.activity.ReduksActivity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.beyondeye.reduks.activity

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import com.beyondeye.reduks.*
import com.beyondeye.reduks.rx.RxStore
import com.beyondeye.reduks.rx.RxStoreSubscriber
Expand Down

0 comments on commit 06398ce

Please sign in to comment.