diff --git a/DonutTracker/NavigationUI/.gitignore b/DonutTracker/NavigationUI/.gitignore
deleted file mode 100644
index d471b69..0000000
--- a/DonutTracker/NavigationUI/.gitignore
+++ /dev/null
@@ -1,27 +0,0 @@
-# built application files
-*.apk
-*.ap_
-# Mac files
-.DS_Store
-# files for the dex VM
-*.dex
-# Java class files
-*.class
-# generated files
-bin/
-gen/
-# Ignore gradle files
-.gradle/
-build/
-# Local configuration file (sdk path, etc)
-local.properties
-# Proguard folder generated by Eclipse
-proguard/
-proguard-project.txt
-# Eclipse files
-.project
-.classpath
-.settings/
-# Android Studio/IDEA
-*.iml
-.idea
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/README.md b/DonutTracker/NavigationUI/README.md
deleted file mode 100644
index 76a024f..0000000
--- a/DonutTracker/NavigationUI/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-MAD Skills Navigation Sample (Donut Tracker)
-==============================================
-
-This sample shows the features of Navigation component highlighted by the second Navigation
-series in the MAD Skills [videos](https://www.youtube.com/user/androiddevelopers)
-and [articles](https://medium.com/androiddevelopers). Specifically, episodes
-1, 2, 3, and 4 walk through code from this sample.
-
-### Features
-
-This sample showcases the following features of the Navigation component:
-
- * NavigationUI (episode 1)
- * Conditional Navigation (episode 2)
- * Nested Graphs and Include (episode 3)
- * Navigation in Feature Modules (episode 4)
-
-### Screenshots
-
-
-### Other Resources
-
- * For an overview of using Navigation component, check out
- [Get started with the Navigation component](https://developer.android.com/guide/navigation/navigation-getting-started)
- * Consider including the [Navigation KTX libraries](https://developer.android.com/topic/libraries/architecture/adding-components#navigation)
- for more concise uses of the Navigation component. For example, calls to `Navigation.findNavController(view)` can
- be expressed as `view.findNavController()`.
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/.gitignore b/DonutTracker/NavigationUI/app/.gitignore
deleted file mode 100644
index d471b69..0000000
--- a/DonutTracker/NavigationUI/app/.gitignore
+++ /dev/null
@@ -1,27 +0,0 @@
-# built application files
-*.apk
-*.ap_
-# Mac files
-.DS_Store
-# files for the dex VM
-*.dex
-# Java class files
-*.class
-# generated files
-bin/
-gen/
-# Ignore gradle files
-.gradle/
-build/
-# Local configuration file (sdk path, etc)
-local.properties
-# Proguard folder generated by Eclipse
-proguard/
-proguard-project.txt
-# Eclipse files
-.project
-.classpath
-.settings/
-# Android Studio/IDEA
-*.iml
-.idea
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/build.gradle b/DonutTracker/NavigationUI/app/build.gradle
deleted file mode 100644
index 53891c4..0000000
--- a/DonutTracker/NavigationUI/app/build.gradle
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: "androidx.navigation.safeargs.kotlin"
-apply plugin: 'kotlin-kapt'
-
-android {
- compileSdkVersion 29
- buildToolsVersion "29.0.2"
-
- buildFeatures {
- viewBinding = true
- }
-
- defaultConfig {
- applicationId "com.android.samples.navdonutcreator"
- minSdkVersion 21
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-
-// To inline the bytecode built with JVM target 1.8 into
-// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
-
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
-
- packagingOptions {
- exclude 'META-INF/atomicfu.kotlin_module'
- }
-}
-
-configurations {
- ktlint
-}
-
-dependencies {
- implementation "androidx.appcompat:appcompat:$appCompatVersion"
- implementation "androidx.core:core-ktx:$ktxVersion"
- implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
- implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:$archLifecycleVersion"
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:$archLifecycleVersion"
- implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
- implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
- implementation "androidx.room:room-runtime:$roomVersion"
- kapt "androidx.room:room-compiler:$roomVersion"
- implementation "androidx.room:room-ktx:$roomVersion"
- implementation "com.google.android.material:material:$materialVersion"
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
- api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
-
- ktlint "com.pinterest:ktlint:$ktlintVersion"
-}
-
-
-// Disable the 'paren-spacing' rule which conflicts with non-paren annotations on functional types
-task ktlint(type: JavaExec, group: "verification") {
- description = "Check Kotlin code style."
- main = "com.pinterest.ktlint.Main"
- classpath = configurations.ktlint
- args "src/**/*.kt", "--disabled_rules", "paren-spacing"
-}
-check.dependsOn ktlint
-
-task ktlintFormat(type: JavaExec, group: "formatting") {
- description = "Fix Kotlin code style deviations."
- main = "com.pinterest.ktlint.Main"
- classpath = configurations.ktlint
- args "-F", "src/**/*.kt", "--disabled_rules", "paren-spacing"
-}
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/AndroidManifest.xml b/DonutTracker/NavigationUI/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 3849a2a..0000000
--- a/DonutTracker/NavigationUI/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/MainActivity.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/MainActivity.kt
deleted file mode 100644
index a5079f9..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/MainActivity.kt
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.Menu
-import android.view.MenuItem
-import androidx.appcompat.app.AppCompatActivity
-import androidx.navigation.NavController
-import androidx.navigation.findNavController
-import androidx.navigation.fragment.NavHostFragment
-import androidx.navigation.ui.AppBarConfiguration
-import androidx.navigation.ui.navigateUp
-import androidx.navigation.ui.onNavDestinationSelected
-import androidx.navigation.ui.setupActionBarWithNavController
-import androidx.navigation.ui.setupWithNavController
-import com.android.samples.donuttracker.databinding.ActivityMainBinding
-import com.google.android.material.bottomnavigation.BottomNavigationView
-import com.google.android.material.navigation.NavigationView
-
-/**
- * Main activity class. Not much happens here, just some basic UI setup.
- * The main logic occurs in the fragments which populate this activity.
- */
-class MainActivity : AppCompatActivity() {
-
- private lateinit var navController: NavController
- private lateinit var appBarConfiguration: AppBarConfiguration
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
-
- val binding = ActivityMainBinding.inflate(LayoutInflater.from(this))
- setContentView(binding.root)
-
- val navHostFragment = supportFragmentManager.findFragmentById(
- R.id.nav_host_fragment
- ) as NavHostFragment
- navController = navHostFragment.navController
-
- appBarConfiguration= AppBarConfiguration(navController.graph)
-
- val toolbar = binding.toolbar
- setSupportActionBar(toolbar)
- setupActionBarWithNavController(navController, appBarConfiguration)
- setupBottomNavMenu(navController)
- setupNavigationMenu(navController)
-
- Notifier.init(this)
- }
-
- private fun setupNavigationMenu(navController: NavController){
- val sideNavView = findViewById(R.id.nav_view)
- sideNavView?.setupWithNavController(navController)
- }
- private fun setupBottomNavMenu(navController: NavController){
- val bottomNav = findViewById(R.id.bottom_nav_view)
- bottomNav?.setupWithNavController(navController)
- }
-
- override fun onSupportNavigateUp(): Boolean {
- return findNavController(R.id.nav_host_fragment).navigateUp(appBarConfiguration)
- }
-
- override fun onCreateOptionsMenu(menu: Menu): Boolean {
- // Inflate the menu; this adds items to the action bar if it is present.
- menuInflater.inflate(R.menu.menu_main, menu)
- return true
- }
-
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- // Handle action bar item clicks here. The action bar will
- // automatically handle clicks on the Home/Up button, so long
- // as you specify a parent activity in AndroidManifest.xml.
- return item.onNavDestinationSelected(
- findNavController(R.id.nav_host_fragment)
- ) || super.onOptionsItemSelected(item)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/Notifier.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/Notifier.kt
deleted file mode 100644
index a9df9c4..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/Notifier.kt
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker
-
-import android.app.Activity
-import android.app.NotificationChannel
-import android.app.NotificationManager
-import android.app.PendingIntent
-import android.content.Context
-import android.os.Build
-import androidx.appcompat.app.AppCompatActivity
-import androidx.core.app.NotificationCompat
-import androidx.core.app.NotificationManagerCompat
-
-/**
- * Utility class for posting notifications.
- * This class creates the notification channel (as necessary) and posts to it when requested.
- */
-object Notifier {
-
- private const val channelId = "Default"
-
- fun init(activity: Activity) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- val notificationManager =
- activity.getSystemService(AppCompatActivity.NOTIFICATION_SERVICE) as NotificationManager
- val existingChannel = notificationManager.getNotificationChannel(channelId)
- if (existingChannel == null) {
- // Create the NotificationChannel
- val name = activity.getString(R.string.defaultChannel)
- val importance = NotificationManager.IMPORTANCE_DEFAULT
- val mChannel = NotificationChannel(channelId, name, importance)
- mChannel.description = activity.getString(R.string.notificationDescription)
- notificationManager.createNotificationChannel(mChannel)
- }
- }
- }
-
- fun postNotification(id: Long, context: Context, intent: PendingIntent) {
- val builder = NotificationCompat.Builder(context, channelId)
- builder.setContentTitle(context.getString(R.string.deepLinkNotificationTitle))
- .setSmallIcon(R.drawable.donut_with_sprinkles)
- val text = context.getString(R.string.addDonutInfo)
- val notification = builder.setContentText(text)
- .setPriority(NotificationCompat.PRIORITY_HIGH)
- .setContentIntent(intent)
- .setAutoCancel(true)
- .build()
- val notificationManager = NotificationManagerCompat.from(context)
- // Remove prior notifications; only allow one at a time to edit the latest item
- notificationManager.cancelAll()
- notificationManager.notify(id.toInt(), notification)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryDialogFragment.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryDialogFragment.kt
deleted file mode 100644
index b102096..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryDialogFragment.kt
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.viewModels
-import androidx.lifecycle.observe
-import androidx.navigation.fragment.findNavController
-import androidx.navigation.fragment.navArgs
-import com.android.samples.donuttracker.Notifier
-import com.android.samples.donuttracker.R
-import com.android.samples.donuttracker.databinding.CoffeeEntryDialogBinding
-import com.android.samples.donuttracker.model.Coffee
-import com.android.samples.donuttracker.storage.SnackDatabase
-import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-
-/**
- * This dialog allows the user to enter information about a cup of coffee, either creating a new
- * entry or updating an existing one.
- */
-class CoffeeEntryDialogFragment : BottomSheetDialogFragment() {
-
- private enum class EditingState {
- NEW_COFFEE,
- EXISTING_COFFEE
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return CoffeeEntryDialogBinding.inflate(inflater, container, false).root
- }
-
- @SuppressLint("SetTextI18n")
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val coffeeDao = SnackDatabase.getDatabase(requireContext()).coffeeDao()
-
- val coffeeEntryViewModel: CoffeeEntryViewModel by viewModels {
- CoffeeViewModelFactory(coffeeDao)
- }
-
- val binding = CoffeeEntryDialogBinding.bind(view)
-
- var coffee: Coffee? = null
- val args: CoffeeEntryDialogFragmentArgs by navArgs()
- val editingState =
- if (args.itemId > 0) {
- EditingState.EXISTING_COFFEE
- } else {
- EditingState.NEW_COFFEE
- }
-
- // If we arrived here with an itemId of >= 0, then we are editing an existing item
- if (editingState == EditingState.EXISTING_COFFEE) {
- // Request to edit an existing item, whose id was passed in as an argument.
- // Retrieve that item and populate the UI with its details
- coffeeEntryViewModel.get(args.itemId).observe(viewLifecycleOwner) { coffeeItem ->
- binding.apply {
- name.setText(coffeeItem.name)
- description.setText(coffeeItem.description)
- ratingBar.rating = coffeeItem.rating.toFloat()
- }
-
- coffee = coffeeItem
- }
- }
-
- // When the user clicks the Done button, use the data here to either update
- // an existing item or create a new one
- binding.doneButton.setOnClickListener {
- // Grab these now since the Fragment may go away before the setupNotification
- // lambda below is called
- val context = requireContext().applicationContext
- val navController = findNavController()
-
- coffeeEntryViewModel.addData(
- coffee?.id ?: 0,
- binding.name.text.toString(),
- binding.description.text.toString(),
- binding.ratingBar.rating.toInt()
- ) { actualId ->
- val arg = CoffeeEntryDialogFragmentArgs(actualId).toBundle()
- val pendingIntent = navController
- .createDeepLink()
- .setDestination(R.id.coffeeEntryDialogFragment)
- .setArguments(arg)
- .createPendingIntent()
-
- Notifier.postNotification(actualId, context, pendingIntent)
- }
- dismiss()
- }
-
- // User clicked the Cancel button; just exit the dialog without saving the data
- binding.cancelButton.setOnClickListener {
- dismiss()
- }
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryViewModel.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryViewModel.kt
deleted file mode 100644
index 07f5df3..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeEntryViewModel.kt
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import androidx.lifecycle.viewModelScope
-import com.android.samples.donuttracker.model.Coffee
-import com.android.samples.donuttracker.storage.CoffeeDao
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class CoffeeEntryViewModel(private val coffeeDao: CoffeeDao) : ViewModel() {
-
- private var coffeeLiveData: LiveData? = null
-
- fun get(id: Long): LiveData {
- return coffeeLiveData ?: liveData {
- emit(coffeeDao.get(id))
- }.also {
- coffeeLiveData = it
- }
- }
-
- fun addData(
- id: Long,
- name: String,
- description: String,
- rating: Int,
- setupNotification: (Long) -> Unit
- ) {
- val coffee = Coffee(id, name, description, rating)
-
- CoroutineScope(Dispatchers.IO).launch {
- var actualId = id
-
- if (id > 0) {
- update(coffee)
- } else {
- actualId = insert(coffee)
- }
-
- setupNotification(actualId)
- }
- }
-
- private suspend fun insert(donut: Coffee) = coffeeDao.insert(donut)
-
- private fun update(donut: Coffee) = viewModelScope.launch(Dispatchers.IO) {
- coffeeDao.update(donut)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeList.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeList.kt
deleted file mode 100644
index 64743a7..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeList.kt
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.core.app.NotificationManagerCompat
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.ViewModelProvider
-import androidx.navigation.findNavController
-import androidx.navigation.fragment.findNavController
-import com.android.samples.donuttracker.databinding.CoffeeListBinding
-import com.android.samples.donuttracker.storage.SnackDatabase
-
-/**
- * Fragment containing the RecyclerView which shows the current list of coffees being tracked.
- */
-class CoffeeList : Fragment() {
-
- private lateinit var coffeeListViewModel: CoffeeListViewModel
-
- private val adapter = CoffeeListAdapter(
- onEdit = { coffee ->
- findNavController().navigate(
- CoffeeListDirections.actionCoffeeListToCoffeeEntryDialogFragment(coffee.id)
- )
- },
- onDelete = { coffee ->
- NotificationManagerCompat.from(requireContext()).cancel(coffee.id.toInt())
- coffeeListViewModel.delete(coffee)
- }
- )
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return CoffeeListBinding.inflate(inflater, container, false).root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val binding = CoffeeListBinding.bind(view)
- val coffeeDao = SnackDatabase.getDatabase(requireContext()).coffeeDao()
-
- coffeeListViewModel = ViewModelProvider(this, CoffeeViewModelFactory(coffeeDao))
- .get(CoffeeListViewModel::class.java)
-
- coffeeListViewModel.coffeeList.observe(viewLifecycleOwner) { coffees ->
- adapter.submitList(coffees)
- }
-
- binding.recyclerView.adapter = adapter
-
- binding.fab.setOnClickListener { fabView ->
- fabView.findNavController().navigate(
- CoffeeListDirections.actionCoffeeListToCoffeeEntryDialogFragment()
- )
- }
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListAdapter.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListAdapter.kt
deleted file mode 100644
index 8fb0f86..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListAdapter.kt
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.recyclerview.widget.DiffUtil
-import androidx.recyclerview.widget.ListAdapter
-import androidx.recyclerview.widget.RecyclerView
-import com.android.samples.donuttracker.R
-import com.android.samples.donuttracker.databinding.CoffeeItemBinding
-import com.android.samples.donuttracker.model.Coffee
-
-/**
- * The adapter used by the RecyclerView to display the current list of Coffees
- */
-class CoffeeListAdapter(
- private var onEdit: (Coffee) -> Unit,
- private var onDelete: (Coffee) -> Unit
-) : ListAdapter(CoffeeDiffCallback()) {
-
- class CoffeeListViewHolder(
- private val binding: CoffeeItemBinding,
- private var onEdit: (Coffee) -> Unit,
- private var onDelete: (Coffee) -> Unit
- ) : RecyclerView.ViewHolder(binding.root) {
-
- private var coffeeId: Long = -1
- private var nameView = binding.name
- private var description = binding.description
- private var thumbnail = binding.thumbnail
- private var rating = binding.rating
- private var coffee: Coffee? = null
-
- fun bind(coffee: Coffee) {
- coffeeId = coffee.id
- nameView.text = coffee.name
- description.text = coffee.description
- rating.text = coffee.rating.toString()
- thumbnail.setImageResource(R.drawable.coffee_cup)
- this.coffee = coffee
- binding.deleteButton.setOnClickListener {
- onDelete(coffee)
- }
- binding.root.setOnClickListener {
- onEdit(coffee)
- }
- }
- }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = CoffeeListViewHolder(
- CoffeeItemBinding.inflate(LayoutInflater.from(parent.context), parent, false),
- onEdit,
- onDelete
- )
-
- override fun onBindViewHolder(holder: CoffeeListViewHolder, position: Int) {
- holder.bind(getItem(position))
- }
-}
-
-class CoffeeDiffCallback : DiffUtil.ItemCallback() {
- override fun areItemsTheSame(oldItem: Coffee, newItem: Coffee): Boolean {
- return oldItem.id == newItem.id
- }
-
- override fun areContentsTheSame(oldItem: Coffee, newItem: Coffee): Boolean {
- return oldItem == newItem
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListViewModel.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListViewModel.kt
deleted file mode 100644
index a5a0f48..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeListViewModel.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.viewModelScope
-import com.android.samples.donuttracker.model.Coffee
-import com.android.samples.donuttracker.storage.CoffeeDao
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-/**
- * This ViewModel is used to access the underlying data and to observe changes to it.
- */
-class CoffeeListViewModel(private val coffeeDao: CoffeeDao) : ViewModel() {
-
- // Users of this ViewModel will observe changes to its coffees list to know when
- // to redisplay those changes
- val coffeeList: LiveData> = coffeeDao.getAll()
-
- fun delete(coffee: Coffee) = viewModelScope.launch(Dispatchers.IO) {
- coffeeDao.delete(coffee)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeViewModelFactory.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeViewModelFactory.kt
deleted file mode 100644
index e4dd189..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/coffee/CoffeeViewModelFactory.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.coffee
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.android.samples.donuttracker.storage.CoffeeDao
-
-class CoffeeViewModelFactory(private val coffeeDao: CoffeeDao) : ViewModelProvider.Factory {
-
- override fun create(modelClass: Class): T {
- if (modelClass.isAssignableFrom(CoffeeListViewModel::class.java)) {
- @Suppress("UNCHECKED_CAST")
- return CoffeeListViewModel(coffeeDao) as T
- } else if (modelClass.isAssignableFrom(CoffeeEntryViewModel::class.java)) {
- @Suppress("UNCHECKED_CAST")
- return CoffeeEntryViewModel(coffeeDao) as T
- }
- throw IllegalArgumentException("Unknown ViewModel class")
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryDialogFragment.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryDialogFragment.kt
deleted file mode 100644
index 74432ce..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryDialogFragment.kt
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.viewModels
-import androidx.lifecycle.observe
-import androidx.navigation.fragment.findNavController
-import androidx.navigation.fragment.navArgs
-import com.android.samples.donuttracker.Notifier
-import com.android.samples.donuttracker.R
-import com.android.samples.donuttracker.databinding.DonutEntryDialogBinding
-import com.android.samples.donuttracker.model.Donut
-import com.android.samples.donuttracker.storage.SnackDatabase
-import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-
-/**
- * This dialog allows the user to enter information about a donut, either creating a new
- * entry or updating an existing one.
- */
-class DonutEntryDialogFragment : BottomSheetDialogFragment() {
-
- private enum class EditingState {
- NEW_DONUT,
- EXISTING_DONUT
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return DonutEntryDialogBinding.inflate(inflater, container, false).root
- }
-
- @SuppressLint("SetTextI18n")
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val donutDao = SnackDatabase.getDatabase(requireContext()).donutDao()
-
- val donutEntryViewModel: DonutEntryViewModel by viewModels {
- DonutViewModelFactory(donutDao)
- }
-
- val binding = DonutEntryDialogBinding.bind(view)
-
- var donut: Donut? = null
- val args: DonutEntryDialogFragmentArgs by navArgs()
- val editingState =
- if (args.itemId > 0) {
- EditingState.EXISTING_DONUT
- } else {
- EditingState.NEW_DONUT
- }
-
- // If we arrived here with an itemId of >= 0, then we are editing an existing item
- if (editingState == EditingState.EXISTING_DONUT) {
- // Request to edit an existing item, whose id was passed in as an argument.
- // Retrieve that item and populate the UI with its details
- donutEntryViewModel.get(args.itemId).observe(viewLifecycleOwner) { donutItem ->
- binding.apply {
- name.setText(donutItem.name)
- description.setText(donutItem.description)
- ratingBar.rating = donutItem.rating.toFloat()
- }
- donut = donutItem
- }
- }
-
- // When the user clicks the Done button, use the data here to either update
- // an existing item or create a new one
- binding.doneButton.setOnClickListener {
- // Grab these now since the Fragment may go away before the setupNotification
- // lambda below is called
- val context = requireContext().applicationContext
- val navController = findNavController()
-
- donutEntryViewModel.addData(
- donut?.id ?: 0,
- binding.name.text.toString(),
- binding.description.text.toString(),
- binding.ratingBar.rating.toInt()
- ) { actualId ->
- val arg = DonutEntryDialogFragmentArgs(actualId).toBundle()
- val pendingIntent = navController
- .createDeepLink()
- .setDestination(R.id.donutEntryDialogFragment)
- .setArguments(arg)
- .createPendingIntent()
-
- Notifier.postNotification(actualId, context, pendingIntent)
- }
- dismiss()
- }
-
- // User clicked the Cancel button; just exit the dialog without saving the data
- binding.cancelButton.setOnClickListener {
- dismiss()
- }
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryViewModel.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryViewModel.kt
deleted file mode 100644
index 3c42716..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutEntryViewModel.kt
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.liveData
-import androidx.lifecycle.viewModelScope
-import com.android.samples.donuttracker.model.Donut
-import com.android.samples.donuttracker.storage.DonutDao
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-class DonutEntryViewModel(private val donutDao: DonutDao) : ViewModel() {
-
- private var donutLiveData: LiveData? = null
-
- fun get(id: Long): LiveData {
- return donutLiveData ?: liveData {
- emit(donutDao.get(id))
- }.also {
- donutLiveData = it
- }
- }
-
- fun addData(
- id: Long,
- name: String,
- description: String,
- rating: Int,
- setupNotification: (Long) -> Unit
- ) {
- val donut = Donut(id, name, description, rating)
-
- CoroutineScope(Dispatchers.IO).launch {
- var actualId = id
-
- if (id > 0) {
- update(donut)
- } else {
- actualId = insert(donut)
- }
-
- setupNotification(actualId)
- }
- }
-
- private suspend fun insert(donut: Donut): Long {
- return donutDao.insert(donut)
- }
-
- private fun update(donut: Donut) = viewModelScope.launch(Dispatchers.IO) {
- donutDao.update(donut)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutList.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutList.kt
deleted file mode 100644
index 76846c1..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutList.kt
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.core.app.NotificationManagerCompat
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.ViewModelProvider
-import androidx.lifecycle.observe
-import androidx.navigation.findNavController
-import androidx.navigation.fragment.findNavController
-import com.android.samples.donuttracker.databinding.DonutListBinding
-import com.android.samples.donuttracker.storage.SnackDatabase
-
-/**
- * Fragment containing the RecyclerView which shows the current list of donuts being tracked.
- */
-class DonutList : Fragment() {
-
- private lateinit var donutListViewModel: DonutListViewModel
-
- private val adapter = DonutListAdapter(
- onEdit = { donut ->
- findNavController().navigate(
- DonutListDirections.actionDonutListToDonutEntryDialogFragment(donut.id)
- )
- },
- onDelete = { donut ->
- NotificationManagerCompat.from(requireContext()).cancel(donut.id.toInt())
- donutListViewModel.delete(donut)
- }
- )
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val binding = DonutListBinding.bind(view)
- val donutDao = SnackDatabase.getDatabase(requireContext()).donutDao()
- donutListViewModel = ViewModelProvider(this, DonutViewModelFactory(donutDao))
- .get(DonutListViewModel::class.java)
-
- donutListViewModel.donuts.observe(viewLifecycleOwner) { donuts ->
- adapter.submitList(donuts)
- }
-
- binding.recyclerView.adapter = adapter
-
- binding.fab.setOnClickListener { fabView ->
- fabView.findNavController().navigate(
- DonutListDirections.actionDonutListToDonutEntryDialogFragment()
- )
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return DonutListBinding.inflate(inflater, container, false).root
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListAdapter.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListAdapter.kt
deleted file mode 100644
index b81b36c..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListAdapter.kt
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.recyclerview.widget.DiffUtil
-import androidx.recyclerview.widget.ListAdapter
-import androidx.recyclerview.widget.RecyclerView
-import com.android.samples.donuttracker.R
-import com.android.samples.donuttracker.databinding.DonutItemBinding
-import com.android.samples.donuttracker.model.Donut
-
-/**
- * The adapter used by the RecyclerView to display the current list of donuts
- */
-class DonutListAdapter(
- private var onEdit: (Donut) -> Unit,
- private var onDelete: (Donut) -> Unit
-) : ListAdapter(DonutDiffCallback()) {
-
- class DonutListViewHolder(
- private val binding: DonutItemBinding,
- private var onEdit: (Donut) -> Unit,
- private var onDelete: (Donut) -> Unit
- ) : RecyclerView.ViewHolder(binding.root) {
- private var donutId: Long = -1
- private var nameView = binding.name
- private var description = binding.description
- private var thumbnail = binding.thumbnail
- private var rating = binding.rating
- private var donut: Donut? = null
-
- fun bind(donut: Donut) {
- donutId = donut.id
- nameView.text = donut.name
- description.text = donut.description
- rating.text = donut.rating.toString()
- thumbnail.setImageResource(R.drawable.donut_with_sprinkles)
- this.donut = donut
- binding.deleteButton.setOnClickListener {
- onDelete(donut)
- }
- binding.root.setOnClickListener {
- onEdit(donut)
- }
- }
- }
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = DonutListViewHolder(
- DonutItemBinding.inflate(LayoutInflater.from(parent.context), parent, false),
- onEdit,
- onDelete
- )
-
- override fun onBindViewHolder(holder: DonutListViewHolder, position: Int) {
- holder.bind(getItem(position))
- }
-}
-
-class DonutDiffCallback : DiffUtil.ItemCallback() {
- override fun areItemsTheSame(oldItem: Donut, newItem: Donut): Boolean {
- return oldItem.id == newItem.id
- }
-
- override fun areContentsTheSame(oldItem: Donut, newItem: Donut): Boolean {
- return oldItem == newItem
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListViewModel.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListViewModel.kt
deleted file mode 100644
index d6ba069..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutListViewModel.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.viewModelScope
-import com.android.samples.donuttracker.model.Donut
-import com.android.samples.donuttracker.storage.DonutDao
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-
-/**
- * This ViewModel is used to access the underlying data and to observe changes to it.
- */
-class DonutListViewModel(private val donutDao: DonutDao) : ViewModel() {
-
- // Users of this ViewModel will observe changes to its donuts list to know when
- // to redisplay those changes
- val donuts: LiveData> = donutDao.getAll()
-
- fun delete(donut: Donut) = viewModelScope.launch(Dispatchers.IO) {
- donutDao.delete(donut)
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutViewModelFactory.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutViewModelFactory.kt
deleted file mode 100644
index 765c7d3..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/donut/DonutViewModelFactory.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.donut
-
-import androidx.lifecycle.ViewModel
-import androidx.lifecycle.ViewModelProvider
-import com.android.samples.donuttracker.storage.DonutDao
-
-class DonutViewModelFactory(private val donutDao: DonutDao) : ViewModelProvider.Factory {
-
- override fun create(modelClass: Class): T {
- if (modelClass.isAssignableFrom(DonutListViewModel::class.java)) {
- @Suppress("UNCHECKED_CAST")
- return DonutListViewModel(donutDao) as T
- } else if (modelClass.isAssignableFrom(DonutEntryViewModel::class.java)) {
- @Suppress("UNCHECKED_CAST")
- return DonutEntryViewModel(donutDao) as T
- }
- throw IllegalArgumentException("Unknown ViewModel class")
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Coffee.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Coffee.kt
deleted file mode 100644
index aef8447..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Coffee.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.model
-
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-/**
- * This class holds the data that we are tracking for each cup of coffee: its name, a description,
- * and a rating.
- */
-@Entity
-data class Coffee(
- @PrimaryKey(autoGenerate = true) val id: Long,
- val name: String,
- val description: String = "",
- val rating: Int
-)
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Donut.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Donut.kt
deleted file mode 100644
index 5b9191d..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/model/Donut.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.model
-
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-/**
- * This class holds the data that we are tracking for each donut: its name, a description, and
- * a rating.
- */
-@Entity
-data class Donut(
- @PrimaryKey(autoGenerate = true) val id: Long,
- val name: String,
- val description: String = "",
- val rating: Int
-)
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/setup/SelectionFragment.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/setup/SelectionFragment.kt
deleted file mode 100644
index 1ab939f..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/setup/SelectionFragment.kt
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.setup
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.navigation.findNavController
-import com.android.samples.donuttracker.databinding.FragmentSelectionBinding
-
-/**
- * This Fragment enables/disables coffee tracking feature.
- */
-class SelectionFragment : Fragment() {
-
- override fun onCreateView(
- inflater: LayoutInflater, container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- // Inflate the layout for this fragment
- return FragmentSelectionBinding.inflate(inflater, container, false).root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val binding = FragmentSelectionBinding.bind(view)
-
- binding.button.setOnClickListener { button ->
- val coffeeEnabled = binding.checkBox.isSelected
- //TODO enable coffee tracker
-
- button.findNavController().navigate(
- SelectionFragmentDirections.actionSelectionFragmentToDonutList()
- )
- }
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/CoffeeDao.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/CoffeeDao.kt
deleted file mode 100644
index f3c9953..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/CoffeeDao.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.storage
-
-import androidx.lifecycle.LiveData
-import androidx.room.Dao
-import androidx.room.Delete
-import androidx.room.Insert
-import androidx.room.Query
-import androidx.room.Update
-import com.android.samples.donuttracker.model.Coffee
-
-@Dao
-interface CoffeeDao {
- @Query("SELECT * FROM coffee")
- fun getAll(): LiveData>
-
- @Query("SELECT * FROM coffee WHERE id = :id")
- suspend fun get(id: Long): Coffee
-
- @Insert
- suspend fun insert(coffee: Coffee): Long
-
- @Delete
- suspend fun delete(coffee: Coffee)
-
- @Update
- suspend fun update(coffee: Coffee)
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/DonutDao.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/DonutDao.kt
deleted file mode 100644
index d371a16..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/DonutDao.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.storage
-
-import androidx.lifecycle.LiveData
-import androidx.room.Dao
-import androidx.room.Delete
-import androidx.room.Insert
-import androidx.room.Query
-import androidx.room.Update
-import com.android.samples.donuttracker.model.Donut
-
-/**
- * The Data Access Object used to retrieve and store data from/to the underlying database.
- * This API is not used directly; instead, callers should use the Repository which calls into
- * this DAO.
- */
-@Dao
-interface DonutDao {
- @Query("SELECT * FROM donut")
- fun getAll(): LiveData>
-
- @Query("SELECT * FROM donut WHERE id = :id")
- suspend fun get(id: Long): Donut
-
- @Insert
- suspend fun insert(donut: Donut): Long
-
- @Delete
- suspend fun delete(donut: Donut)
-
- @Update
- suspend fun update(donut: Donut)
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/SnackDatabase.kt b/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/SnackDatabase.kt
deleted file mode 100644
index 869c615..0000000
--- a/DonutTracker/NavigationUI/app/src/main/java/com/android/samples/donuttracker/storage/SnackDatabase.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.samples.donuttracker.storage
-
-import android.content.Context
-import androidx.room.Database
-import androidx.room.Room
-import androidx.room.RoomDatabase
-import com.android.samples.donuttracker.model.Coffee
-import com.android.samples.donuttracker.model.Donut
-
-/**
- * The underlying database where information about the donuts is stored.
- */
-@Database(entities = arrayOf(Donut::class, Coffee::class), version = 1)
-abstract class SnackDatabase : RoomDatabase() {
-
- abstract fun donutDao(): DonutDao
-
- abstract fun coffeeDao(): CoffeeDao
-
- companion object {
- @Volatile private var INSTANCE: SnackDatabase? = null
-
- fun getDatabase(context: Context): SnackDatabase {
- val tempInstance = INSTANCE
- if (tempInstance != null) {
- return tempInstance
- }
- synchronized(this) {
- val instance = Room.databaseBuilder(
- context,
- SnackDatabase::class.java,
- "snack_database"
- ).build()
- INSTANCE = instance
- return instance
- }
- }
- }
-}
diff --git a/DonutTracker/NavigationUI/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/DonutTracker/NavigationUI/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 793e74f..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/drawable/coffee_cup.xml b/DonutTracker/NavigationUI/app/src/main/res/drawable/coffee_cup.xml
deleted file mode 100644
index dbbce61..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/drawable/coffee_cup.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/drawable/donut_with_sprinkles.xml b/DonutTracker/NavigationUI/app/src/main/res/drawable/donut_with_sprinkles.xml
deleted file mode 100644
index a85b73f..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/drawable/donut_with_sprinkles.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_clear_24px.xml b/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_clear_24px.xml
deleted file mode 100644
index 48373a7..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_clear_24px.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_launcher_background.xml b/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index b6ea9e0..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout-w960dp/activity_main.xml b/DonutTracker/NavigationUI/app/src/main/res/layout-w960dp/activity_main.xml
deleted file mode 100644
index b6df4a9..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout-w960dp/activity_main.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/activity_main.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 5685d0a..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_entry_dialog.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_entry_dialog.xml
deleted file mode 100644
index e7bdccd..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_entry_dialog.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_item.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_item.xml
deleted file mode 100644
index b9ac726..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_item.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_list.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_list.xml
deleted file mode 100644
index 194cd91..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/coffee_list.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_entry_dialog.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/donut_entry_dialog.xml
deleted file mode 100644
index b6957d5..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_entry_dialog.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_item.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/donut_item.xml
deleted file mode 100644
index 5ac148e..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_item.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_list.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/donut_list.xml
deleted file mode 100644
index 637b515..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/donut_list.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/layout/fragment_selection.xml b/DonutTracker/NavigationUI/app/src/main/res/layout/fragment_selection.xml
deleted file mode 100644
index b8d946e..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/layout/fragment_selection.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/menu/bottom_nav_menu.xml b/DonutTracker/NavigationUI/app/src/main/res/menu/bottom_nav_menu.xml
deleted file mode 100644
index 35185d5..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/menu/bottom_nav_menu.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/menu/menu_main.xml b/DonutTracker/NavigationUI/app/src/main/res/menu/menu_main.xml
deleted file mode 100644
index 737744c..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/menu/menu_main.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/menu/nav_drawer_menu.xml b/DonutTracker/NavigationUI/app/src/main/res/menu/nav_drawer_menu.xml
deleted file mode 100644
index 66e3376..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/menu/nav_drawer_menu.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index fcf032a..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index fcf032a..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e60..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd28..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46d..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a87..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac681..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a419..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783c..0000000
Binary files a/DonutTracker/NavigationUI/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/app/src/main/res/navigation/nav_graph.xml b/DonutTracker/NavigationUI/app/src/main/res/navigation/nav_graph.xml
deleted file mode 100644
index 1f5932f..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/navigation/nav_graph.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/values/colors.xml b/DonutTracker/NavigationUI/app/src/main/res/values/colors.xml
deleted file mode 100644
index 9a25184..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- #6200EE
- #3700B3
- #03DAC5
- #FBFBFB
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/values/dimens.xml b/DonutTracker/NavigationUI/app/src/main/res/values/dimens.xml
deleted file mode 100644
index f17ae93..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- 16dp
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/values/strings.xml b/DonutTracker/NavigationUI/app/src/main/res/values/strings.xml
deleted file mode 100644
index 51f530f..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- Donut Tracker
- Settings
-
-
- New Donut
- Create New Donut
- New Donut Shortcut Disabled
- Donut name
- Description
- Rating
- Coffee name
- Description
- Rating
- delete
- DonutTracker default channel
- Notifications from DonutTracker
- Add more donut info!
- Deep Link
- donutName
- Picture of donut
- coffeeName
- Picture of a cup of coffee
- Name
- Done
- Rating
- Continue
- Welcome to Donut Tracker 2
- Enable Coffee tracking?
- Settings
- Coffee List
- Donut List
- Select to enable coffee tracking features
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/values/styles.xml b/DonutTracker/NavigationUI/app/src/main/res/values/styles.xml
deleted file mode 100644
index e024a8a..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DonutTracker/NavigationUI/app/src/main/res/xml-v25/shortcuts.xml b/DonutTracker/NavigationUI/app/src/main/res/xml-v25/shortcuts.xml
deleted file mode 100644
index d3fe357..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/xml-v25/shortcuts.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/app/src/main/res/xml/shortcuts.xml b/DonutTracker/NavigationUI/app/src/main/res/xml/shortcuts.xml
deleted file mode 100644
index 1c8e7df..0000000
--- a/DonutTracker/NavigationUI/app/src/main/res/xml/shortcuts.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/build.gradle b/DonutTracker/NavigationUI/build.gradle
deleted file mode 100644
index d365f11..0000000
--- a/DonutTracker/NavigationUI/build.gradle
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.4.10'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- def nav_version = "2.3.0"
- classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
-
-ext {
- roomVersion = '2.2.5'
- archLifecycleVersion = '2.2.0'
- coreTestingVersion = '2.1.0'
- materialVersion = '1.2.1'
- coroutinesVersion = '1.3.7'
- navigationVersion = '2.3.0'
- fragmentVersion = '1.2.5'
- appCompatVersion = '1.2.0'
- ktxVersion = '1.3.2'
- constraintLayoutVersion = '2.0.2'
- ktlintVersion = '0.37.2'
-}
\ No newline at end of file
diff --git a/DonutTracker/NavigationUI/gradle.properties b/DonutTracker/NavigationUI/gradle.properties
deleted file mode 100644
index 23339e0..0000000
--- a/DonutTracker/NavigationUI/gradle.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# 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
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
diff --git a/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.jar b/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961f..0000000
Binary files a/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.properties b/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 99f79ad..0000000
--- a/DonutTracker/NavigationUI/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#Thu Feb 22 10:53:38 GMT 2018
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
diff --git a/DonutTracker/NavigationUI/gradlew b/DonutTracker/NavigationUI/gradlew
deleted file mode 100755
index cccdd3d..0000000
--- a/DonutTracker/NavigationUI/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/DonutTracker/NavigationUI/gradlew.bat b/DonutTracker/NavigationUI/gradlew.bat
deleted file mode 100644
index e95643d..0000000
--- a/DonutTracker/NavigationUI/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/DonutTracker/NavigationUI/screenshot.png b/DonutTracker/NavigationUI/screenshot.png
deleted file mode 100644
index 167b833..0000000
Binary files a/DonutTracker/NavigationUI/screenshot.png and /dev/null differ
diff --git a/DonutTracker/NavigationUI/settings.gradle b/DonutTracker/NavigationUI/settings.gradle
deleted file mode 100644
index 3bfff7b..0000000
--- a/DonutTracker/NavigationUI/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name='Donut Tracker'
-include ':app'
diff --git a/DonutTracker/NavigationUI/versions.gradle b/DonutTracker/NavigationUI/versions.gradle
deleted file mode 100644
index a5d58e3..0000000
--- a/DonutTracker/NavigationUI/versions.gradle
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/**
- * Shared file between builds so that they can all use the same dependencies and
- * maven repositories.
- **/
-ext.deps = [:]
-def versions = [:]
-versions.activity = '1.1.0'
-versions.android_gradle_plugin = '4.0.0'
-versions.annotations = "1.0.0"
-versions.apache_commons = "2.5"
-versions.appcompat = "1.2.0-alpha02"
-versions.arch_core = "2.1.0"
-versions.atsl_core = "1.2.0"
-versions.atsl_junit = "1.1.1"
-versions.atsl_rules = "1.2.0"
-versions.atsl_runner = "1.2.0"
-versions.benchmark = "1.1.0-alpha01"
-versions.cardview = "1.0.0"
-versions.constraint_layout = "2.0.0-alpha2"
-versions.core_ktx = "1.1.0"
-versions.coroutines = "1.4.1"
-versions.dagger = "2.16"
-versions.dexmaker = "2.2.0"
-versions.espresso = "3.2.0"
-versions.fragment = "1.2.0"
-versions.glide = "4.8.0"
-versions.hamcrest = "1.3"
-versions.junit = "4.12"
-versions.kotlin = "1.4.21"
-versions.lifecycle = "2.2.0"
-versions.material = "1.0.0"
-versions.mockito = "2.25.0"
-versions.mockito_all = "1.10.19"
-versions.mockito_android = "2.25.0"
-versions.mockwebserver = "3.8.1"
-versions.navigation = "2.3.0-alpha01"
-versions.okhttp_logging_interceptor = "3.9.0"
-versions.paging = "3.0.0-alpha13"
-versions.recyclerview = "1.2.0-beta01"
-versions.retrofit = "2.9.0"
-versions.robolectric = "4.2"
-versions.room = "2.3.0-alpha04"
-versions.rx_android = "2.0.1"
-versions.rxjava2 = "2.1.3"
-versions.timber = "4.7.1"
-versions.transition = "1.3.0"
-versions.truth = "1.0.1"
-versions.work = "2.4.0"
-ext.versions = versions
-
-def build_versions = [:]
-build_versions.min_sdk = 14
-build_versions.compile_sdk = 29
-build_versions.target_sdk = 29
-build_versions.build_tools = "29.0.3"
-ext.build_versions = build_versions
-
-def deps = [:]
-
-def activity = [:]
-activity.activity_ktx = "androidx.activity:activity-ktx:$versions.activity"
-deps.activity = activity
-
-deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
-
-deps.annotations = "androidx.annotation:annotation:$versions.annotations"
-
-deps.app_compat = "androidx.appcompat:appcompat:$versions.appcompat"
-
-def arch_core = [:]
-arch_core.runtime = "androidx.arch.core:core-runtime:$versions.arch_core"
-arch_core.testing = "androidx.arch.core:core-testing:$versions.arch_core"
-deps.arch_core = arch_core
-
-def atsl = [:]
-atsl.core = "androidx.test:core:$versions.atsl_core"
-atsl.ext_junit = "androidx.test.ext:junit:$versions.atsl_junit"
-atsl.runner = "androidx.test:runner:$versions.atsl_runner"
-atsl.rules = "androidx.test:rules:$versions.atsl_rules"
-deps.atsl = atsl
-
-deps.benchmark = "androidx.benchmark:benchmark-junit4:$versions.benchmark"
-deps.benchmark_gradle = "androidx.benchmark:benchmark-gradle-plugin:$versions.benchmark"
-
-deps.cardview = "androidx.cardview:cardview:$versions.cardview"
-
-deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
-
-deps.core_ktx = "androidx.core:core-ktx:$versions.core_ktx"
-
-def coroutines = [:]
-coroutines.android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
-coroutines.test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$versions.coroutines"
-deps.coroutines = coroutines
-
-def dagger = [:]
-dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
-dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
-dagger.android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
-dagger.compiler = "com.google.dagger:dagger-compiler:$versions.dagger"
-dagger.android_support_compiler = "com.google.dagger:dagger-android-processor:$versions.dagger"
-deps.dagger = dagger
-
-deps.dexmaker = "com.linkedin.dexmaker:dexmaker-mockito:$versions.dexmaker"
-
-def espresso = [:]
-espresso.core = "androidx.test.espresso:espresso-core:$versions.espresso"
-espresso.contrib = "androidx.test.espresso:espresso-contrib:$versions.espresso"
-espresso.intents = "androidx.test.espresso:espresso-intents:$versions.espresso"
-deps.espresso = espresso
-
-def fragment = [:]
-fragment.runtime = "androidx.fragment:fragment:${versions.fragment}"
-fragment.runtime_ktx = "androidx.fragment:fragment-ktx:${versions.fragment}"
-fragment.testing = "androidx.fragment:fragment-testing:${versions.fragment}"
-deps.fragment = fragment
-
-def glide = [:]
-glide.runtime = "com.github.bumptech.glide:glide:$versions.glide"
-glide.compiler = "com.github.bumptech.glide:compiler:$versions.glide"
-deps.glide = glide
-
-deps.hamcrest = "org.hamcrest:hamcrest-all:$versions.hamcrest"
-
-deps.junit = "junit:junit:$versions.junit"
-
-def kotlin = [:]
-kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
-kotlin.test = "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin"
-kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
-kotlin.allopen = "org.jetbrains.kotlin:kotlin-allopen:$versions.kotlin"
-deps.kotlin = kotlin
-
-def lifecycle = [:]
-lifecycle.runtime = "androidx.lifecycle:lifecycle-runtime:$versions.lifecycle"
-lifecycle.java8 = "androidx.lifecycle:lifecycle-common-java8:$versions.lifecycle"
-lifecycle.compiler = "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle"
-lifecycle.viewmodel_ktx = "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycle"
-lifecycle.livedata_ktx = "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycle"
-deps.lifecycle = lifecycle
-
-deps.material = "com.google.android.material:material:$versions.material"
-
-def mockito = [:]
-mockito.core = "org.mockito:mockito-core:$versions.mockito"
-mockito.all = "org.mockito:mockito-all:$versions.mockito_all"
-mockito.android = "org.mockito:mockito-android:$versions.mockito_android"
-deps.mockito = mockito
-
-deps.mock_web_server = "com.squareup.okhttp3:mockwebserver:$versions.mockwebserver"
-
-def navigation = [:]
-navigation.runtime = "androidx.navigation:navigation-runtime:$versions.navigation"
-navigation.runtime_ktx = "androidx.navigation:navigation-runtime-ktx:$versions.navigation"
-navigation.fragment = "androidx.navigation:navigation-fragment:$versions.navigation"
-navigation.fragment_ktx = "androidx.navigation:navigation-fragment-ktx:$versions.navigation"
-navigation.testing = "androidx.navigation:navigation-testing:$versions.navigation"
-navigation.ui = "androidx.navigation:navigation-ui:$versions.navigation"
-navigation.ui_ktx = "androidx.navigation:navigation-ui-ktx:$versions.navigation"
-navigation.safe_args_plugin = "androidx.navigation:navigation-safe-args-gradle-plugin:$versions.navigation"
-deps.navigation = navigation
-
-deps.okhttp_logging_interceptor = "com.squareup.okhttp3:logging-interceptor:${versions.okhttp_logging_interceptor}"
-
-deps.paging_runtime = "androidx.paging:paging-runtime:$versions.paging"
-
-deps.recyclerview = "androidx.recyclerview:recyclerview:$versions.recyclerview"
-
-def retrofit = [:]
-retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
-retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit"
-retrofit.mock = "com.squareup.retrofit2:retrofit-mock:$versions.retrofit"
-deps.retrofit = retrofit
-
-deps.robolectric = "org.robolectric:robolectric:$versions.robolectric"
-
-def room = [:]
-room.runtime = "androidx.room:room-runtime:$versions.room"
-room.compiler = "androidx.room:room-compiler:$versions.room"
-room.ktx = "androidx.room:room-ktx:$versions.room"
-room.rxjava2 = "androidx.room:room-rxjava2:$versions.room"
-room.testing = "androidx.room:room-testing:$versions.room"
-deps.room = room
-
-deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"
-
-deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
-
-deps.timber = "com.jakewharton.timber:timber:$versions.timber"
-
-deps.transition = "androidx.transition:transition:$versions.transition"
-
-deps.truth = "com.google.truth:truth:$versions.truth"
-
-def work = [:]
-work.runtime = "androidx.work:work-runtime:$versions.work"
-work.testing = "androidx.work:work-testing:$versions.work"
-work.firebase = "androidx.work:work-firebase:$versions.work"
-work.runtime_ktx = "androidx.work:work-runtime-ktx:$versions.work"
-deps.work = work
-
-ext.deps = deps
-
-def addRepos(RepositoryHandler handler) {
- handler.google()
- handler.jcenter()
- handler.maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
-}
-ext.addRepos = this.&addRepos