Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LifeLogger
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
LifeLogger
Commits
a1a5fba6
Unverified
Commit
a1a5fba6
authored
Feb 17, 2019
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: Migrate to AndroidX
parent
df453a19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
31 deletions
+33
-31
build.gradle
app/build.gradle
+15
-15
ExampleInstrumentedTest.kt
...Test/java/fr/plnech/lifelogger/ExampleInstrumentedTest.kt
+2
-2
LogViewModel.java
...rc/main/java/fr/plnech/lifelogger/model/LogViewModel.java
+3
-3
HomeActivity.kt
app/src/main/java/fr/plnech/lifelogger/ui/HomeActivity.kt
+3
-3
activity_home.xml
app/src/main/res/layout/activity_home.xml
+6
-6
content_home.xml
app/src/main/res/layout/content_home.xml
+2
-2
gradle.properties
gradle.properties
+2
-0
No files found.
app/build.gradle
View file @
a1a5fba6
...
@@ -29,7 +29,7 @@ android {
...
@@ -29,7 +29,7 @@ android {
targetSdkVersion
28
targetSdkVersion
28
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
testInstrumentationRunner
"android
.support
.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android
x
.test.runner.AndroidJUnitRunner"
}
}
buildTypes
{
buildTypes
{
release
{
release
{
...
@@ -47,18 +47,18 @@ ext {
...
@@ -47,18 +47,18 @@ ext {
dependencies
{
dependencies
{
// region Kotlin
// region Kotlin
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
kapt
"android.arch.lifecycle:compiler:$archLifecycleVersion"
kapt
'androidx.lifecycle:lifecycle-compiler:2.1.0-alpha02'
// endregion
// endregion
// region Support Library
// region Support Library
implementation
'
com.android.support:appcompat-v7:28.0.0
'
implementation
'
androidx.appcompat:appcompat:1.1.0-alpha02
'
implementation
'com.
android.support:design:28.0.0
'
implementation
'com.
google.android.material:material:1.1.0-alpha03
'
implementation
'
com.android.support.constraint:constraint-layout:1.1.
3'
implementation
'
androidx.constraintlayout:constraintlayout:2.0.0-alpha
3'
// endregion
// endregion
// region ViewModel and LiveData
// region ViewModel and LiveData
implementation
"android.arch.lifecycle:extensions:$archLifecycleVersion"
implementation
'androidx.lifecycle:lifecycle-extensions:2.1.0-alpha02'
kapt
"android.arch.lifecycle:compiler:$archLifecycleVersion"
kapt
'androidx.lifecycle:lifecycle-compiler:2.1.0-alpha02'
// alternatively, just ViewModel
// alternatively, just ViewModel
//implementation "android.arch.lifecycle:viewmodel:$archLifecycleVersion"
//implementation "android.arch.lifecycle:viewmodel:$archLifecycleVersion"
// alternatively, just LiveData
// alternatively, just LiveData
...
@@ -67,24 +67,24 @@ dependencies {
...
@@ -67,24 +67,24 @@ dependencies {
// region Jetpack / Developer Experience
// region Jetpack / Developer Experience
// Room
// Room
implementation
"android.arch.persistence.room:runtime:$roomVersion"
implementation
'androidx.room:room-runtime:2.1.0-alpha04'
kapt
"android.arch.persistence.room:compiler:$roomVersion"
kapt
'androidx.room:room-compiler:2.1.0-alpha04'
// Paging
// Paging
implementation
"android
.arch.paging:runtime:1.0.1
"
implementation
"android
x.paging:paging-runtime:2.1.0
"
implementation
'androidx.core:core-ktx:1.
0.1
'
implementation
'androidx.core:core-ktx:1.
1.0-alpha04
'
// endregion
// endregion
// region Tests
// region Tests
testImplementation
'junit:junit:4.12'
testImplementation
'junit:junit:4.12'
androidTestImplementation
'
com.android.support.test:runner:1.0.2
'
androidTestImplementation
'
androidx.test:runner:1.1.2-alpha01
'
androidTestImplementation
'
com.android.support.test.espresso:espresso-core:3.0.2
'
androidTestImplementation
'
androidx.test.espresso:espresso-core:3.1.2-alpha01
'
// Test helpers for LiveData
// Test helpers for LiveData
testImplementation
"android
.arch.core:core-testing:1.1.1
"
testImplementation
"android
x.arch.core:core-testing:2.0.0
"
// Test helpers for Room
// Test helpers for Room
testImplementation
"android.arch.persistence.room:testing:$roomVersion"
testImplementation
'androidx.room:room-testing:2.1.0-alpha04'
// endregion
// endregion
}
}
app/src/androidTest/java/fr/plnech/lifelogger/ExampleInstrumentedTest.kt
View file @
a1a5fba6
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
package
fr.plnech.lifelogger
package
fr.plnech.lifelogger
import
android
.support
.test.InstrumentationRegistry
import
android
x
.test.InstrumentationRegistry
import
android
.support
.test.runner.AndroidJUnit4
import
android
x
.test.runner.AndroidJUnit4
import
org.junit.Test
import
org.junit.Test
import
org.junit.runner.RunWith
import
org.junit.runner.RunWith
...
...
app/src/main/java/fr/plnech/lifelogger/model/LogViewModel.java
View file @
a1a5fba6
...
@@ -17,9 +17,9 @@
...
@@ -17,9 +17,9 @@
package
fr
.
plnech
.
lifelogger
.
model
;
package
fr
.
plnech
.
lifelogger
.
model
;
import
android
.arch
.lifecycle.LiveData
;
import
android
x
.lifecycle.LiveData
;
import
android
.arch
.lifecycle.MutableLiveData
;
import
android
x
.lifecycle.MutableLiveData
;
import
android
.arch
.lifecycle.ViewModel
;
import
android
x
.lifecycle.ViewModel
;
import
java.util.List
;
import
java.util.List
;
...
...
app/src/main/java/fr/plnech/lifelogger/ui/HomeActivity.kt
View file @
a1a5fba6
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
package
fr.plnech.lifelogger.ui
package
fr.plnech.lifelogger.ui
import
android.os.Bundle
import
android.os.Bundle
import
android.support.design.widget
.Snackbar
import
com.google.android.material.snackbar
.Snackbar
import
android
.support.v7
.app.AppCompatActivity
import
android
x.appcompat
.app.AppCompatActivity
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuItem
import
android.view.MenuItem
import
fr.plnech.lifelogger.R
import
fr.plnech.lifelogger.R
...
@@ -41,7 +41,7 @@ class HomeActivity : AppCompatActivity() {
...
@@ -41,7 +41,7 @@ class HomeActivity : AppCompatActivity() {
fab
.
setOnClickListener
{
view
->
fab
.
setOnClickListener
{
view
->
Snackbar
.
make
(
view
,
"Replace with your own action"
,
Snackbar
.
LENGTH_LONG
)
Snackbar
.
make
(
view
,
"Replace with your own action"
,
Snackbar
.
LENGTH_LONG
)
.
setAction
(
"Action"
,
null
).
show
()
.
setAction
(
"Action"
,
null
).
show
()
}
}
adapter
=
LogAdapter
(
this
,
generateDebugData
())
adapter
=
LogAdapter
(
this
,
generateDebugData
())
...
...
app/src/main/res/layout/activity_home.xml
View file @
a1a5fba6
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
-->
<android
.support.design
.widget.CoordinatorLayout
<android
x.coordinatorlayout
.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
...
@@ -24,23 +24,23 @@
...
@@ -24,23 +24,23 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"fr.plnech.lifelogger.ui.HomeActivity"
>
tools:context=
"fr.plnech.lifelogger.ui.HomeActivity"
>
<
android.support.design.widget
.AppBarLayout
<
com.google.android.material.appbar
.AppBarLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:theme=
"@style/AppTheme.AppBarOverlay"
>
android:theme=
"@style/AppTheme.AppBarOverlay"
>
<android
.support.v7
.widget.Toolbar
<android
x.appcompat
.widget.Toolbar
android:id=
"@+id/toolbar"
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
android:background=
"?attr/colorPrimary"
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
</
android.support.design.widget
.AppBarLayout>
</
com.google.android.material.appbar
.AppBarLayout>
<include
layout=
"@layout/content_home"
/>
<include
layout=
"@layout/content_home"
/>
<
android.support.design.widget
.FloatingActionButton
<
com.google.android.material.floatingactionbutton
.FloatingActionButton
android:id=
"@+id/fab"
android:id=
"@+id/fab"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -48,4 +48,4 @@
...
@@ -48,4 +48,4 @@
android:layout_margin=
"@dimen/fab_margin"
android:layout_margin=
"@dimen/fab_margin"
app:srcCompat=
"@android:drawable/ic_dialog_dialer"
/>
app:srcCompat=
"@android:drawable/ic_dialog_dialer"
/>
</android
.support.design
.widget.CoordinatorLayout>
</android
x.coordinatorlayout
.widget.CoordinatorLayout>
app/src/main/res/layout/content_home.xml
View file @
a1a5fba6
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
-->
<android
.support.constrain
t.ConstraintLayout
<android
x.constraintlayout.widge
t.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
...
@@ -38,4 +38,4 @@
...
@@ -38,4 +38,4 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
</android
.support.constrain
t.ConstraintLayout>
</android
x.constraintlayout.widge
t.ConstraintLayout>
gradle.properties
View file @
a1a5fba6
...
@@ -32,3 +32,5 @@ org.gradle.jvmargs=-Xmx1536m
...
@@ -32,3 +32,5 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
android.useAndroidX
=
true
android.enableJetifier
=
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment