Skip to content

Commit

Permalink
Update sample (#36)
Browse files Browse the repository at this point in the history
* Move sample code into com.deliveryhero.whetstone.sample package

* Update sample dependencies
  • Loading branch information
kingsleyadio authored Aug 3, 2022
1 parent 4458749 commit 0db1ee0
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
8 changes: 4 additions & 4 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ android {

dependencies {
kapt(libs.daggerCompiler)
implementation(project(":whetstone"))
anvil(project(":whetstone-compiler"))
implementation(projects.whetstone)
anvil(projects.whetstoneCompiler)

implementation(libs.androidxActivity)
implementation(libs.androidxCore)
implementation(libs.androidxAppCompat)
implementation("com.google.android.material:material:1.5.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
implementation("com.google.android.material:material:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deliveryhero.whetstone">
package="com.deliveryhero.whetstone.sample">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

Expand All @@ -23,4 +23,4 @@
<service android:name=".MainService" />
</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import com.deliveryhero.whetstone.SingleIn
import com.deliveryhero.whetstone.component.ApplicationComponent
import com.deliveryhero.whetstone.scope.ApplicationScope
import com.squareup.anvil.annotations.MergeComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.injector.ContributesInjector
import com.deliveryhero.whetstone.scope.ActivityScope
import com.deliveryhero.whetstone.viewmodel.ViewModelFactoryProducer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import android.app.Application
import android.app.NotificationChannel
Expand All @@ -7,10 +7,11 @@ import android.app.NotificationManager.IMPORTANCE_DEFAULT
import android.content.Context
import android.os.Build
import android.util.Log
import com.deliveryhero.whetstone.MainService.Companion.NOTIFICATION_CHANNEL_ID
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.component.ApplicationComponent
import com.deliveryhero.whetstone.component.ApplicationComponentOwner
import com.deliveryhero.whetstone.injector.ContributesInjector
import com.deliveryhero.whetstone.sample.MainService.Companion.NOTIFICATION_CHANNEL_ID
import com.deliveryhero.whetstone.scope.ApplicationScope
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import androidx.lifecycle.ViewModel
import com.deliveryhero.whetstone.viewmodel.ContributesViewModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import android.app.Service
import android.content.Intent
import android.os.IBinder
import androidx.core.app.NotificationCompat
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.injector.ContributesInjector
import com.deliveryhero.whetstone.scope.ServiceScope
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.deliveryhero.whetstone
package com.deliveryhero.whetstone.sample

import android.content.Context
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.injector.ContributesInjector
import com.deliveryhero.whetstone.scope.ViewScope
import javax.inject.Inject
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_height="match_parent"
tools:context=".MainActivity">

<com.deliveryhero.whetstone.MainView
<com.deliveryhero.whetstone.sample.MainView
android:id="@+id/hello_world_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -16,4 +16,4 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 0db1ee0

Please sign in to comment.