Skip to content

Commit

Permalink
Moved demonstration app out of root and into samples folder (slackhq#170
Browse files Browse the repository at this point in the history
)

In preparation for creating additional sample/demonstration apps,
created a top level samples directory and populated with existing
demonstration app
  • Loading branch information
kierse authored Oct 4, 2022
1 parent 5ef886e commit 3f026a0
Show file tree
Hide file tree
Showing 57 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ discussion.

Check out this repo with Android Studio. It's a standard gradle project and conventional to checkout.

The primary project is `circuit`. The primary sample is `sample`.
The primary project is `circuit`. The primary sample is `samples/star`.

This project is written in Kotlin and should only use Kotlin.

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
id: gradle
uses: gradle/gradle-build-action@v2
with:
arguments: check :sample:assembleDebug :sample:assembleDebugAndroidTest
arguments: check :samples:star:assembleDebug :samples:star:assembleDebugAndroidTest
gradle-home-cache-cleanup: true
cache-read-only: false

Expand Down Expand Up @@ -84,11 +84,11 @@ jobs:
target: 'aosp_atd'
channel: canary # Necessary for ATDs
script: |
adb uninstall com.slack.circuit.sample || true
adb uninstall com.slack.circuit.sample.androidTest || true
adb uninstall com.slack.circuit.star || true
adb uninstall com.slack.circuit.star.androidTest || true
./gradlew connectedDebugAndroidTest
adb uninstall com.slack.circuit.sample || true
adb uninstall com.slack.circuit.sample.androidTest || true
adb uninstall com.slack.circuit.star || true
adb uninstall com.slack.circuit.star.androidTest || true
- name: (Fail-only) Bundle the build report
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle.kts → samples/star/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ plugins {
}

android {
namespace = "com.slack.circuit.sample"
namespace = "com.slack.circuit.star"

defaultConfig {
minSdk = 28
targetSdk = 32
versionCode = 1
versionName = "1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testApplicationId = "com.slack.circuit.sample.androidTest"
testApplicationId = "com.slack.circuit.star.androidTest"
}

testOptions { unitTests.isIncludeAndroidResources = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample
package com.slack.circuit.star

import android.content.Context
import android.graphics.drawable.Drawable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.petdetail
package com.slack.circuit.star.petdetail

import androidx.activity.ComponentActivity
import androidx.compose.ui.test.assertIsDisplayed
Expand All @@ -28,12 +28,12 @@ import coil.Coil
import com.google.common.truth.Truth.assertThat
import com.slack.circuit.CircuitCompositionLocals
import com.slack.circuit.CircuitConfig
import com.slack.circuit.sample.FakeImageLoader
import com.slack.circuit.sample.R
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.ANIMAL_CONTAINER_TAG
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.PROGRESS_TAG
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.UNKNOWN_ANIMAL_TAG
import com.slack.circuit.sample.petdetail.PetPhotoCarouselTestConstants.CAROUSEL_TAG
import com.slack.circuit.star.FakeImageLoader
import com.slack.circuit.star.R
import com.slack.circuit.star.petdetail.PetDetailTestConstants.ANIMAL_CONTAINER_TAG
import com.slack.circuit.star.petdetail.PetDetailTestConstants.PROGRESS_TAG
import com.slack.circuit.star.petdetail.PetDetailTestConstants.UNKNOWN_ANIMAL_TAG
import com.slack.circuit.star.petdetail.PetPhotoCarouselTestConstants.CAROUSEL_TAG
import org.junit.Before
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.petlist
package com.slack.circuit.star.petlist

import androidx.activity.ComponentActivity
import androidx.compose.ui.Modifier
Expand All @@ -28,13 +28,13 @@ import androidx.compose.ui.test.performClick
import androidx.test.platform.app.InstrumentationRegistry
import coil.Coil
import com.google.common.truth.Truth.assertThat
import com.slack.circuit.sample.FakeImageLoader
import com.slack.circuit.sample.R
import com.slack.circuit.sample.petlist.PetListTestConstants.CARD_TAG
import com.slack.circuit.sample.petlist.PetListTestConstants.GRID_TAG
import com.slack.circuit.sample.petlist.PetListTestConstants.IMAGE_TAG
import com.slack.circuit.sample.petlist.PetListTestConstants.NO_ANIMALS_TAG
import com.slack.circuit.sample.petlist.PetListTestConstants.PROGRESS_TAG
import com.slack.circuit.star.FakeImageLoader
import com.slack.circuit.star.R
import com.slack.circuit.star.petlist.PetListTestConstants.CARD_TAG
import com.slack.circuit.star.petlist.PetListTestConstants.GRID_TAG
import com.slack.circuit.star.petlist.PetListTestConstants.IMAGE_TAG
import com.slack.circuit.star.petlist.PetListTestConstants.NO_ANIMALS_TAG
import com.slack.circuit.star.petlist.PetListTestConstants.PROGRESS_TAG
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.test.runTest
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:icon="@mipmap/ic_launcher"
android:theme="@style/StarTheme"
android:enableOnBackInvokedCallback="true"
android:appComponentFactory="com.slack.circuit.sample.di.StarAppComponentFactory"
android:appComponentFactory="com.slack.circuit.star.di.StarAppComponentFactory"
tools:replace="android:appComponentFactory"
>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample
package com.slack.circuit.star

import android.app.Activity
import android.os.Bundle
Expand All @@ -28,10 +28,10 @@ import com.slack.circuit.NavigableCircuitContent
import com.slack.circuit.backstack.rememberSaveableBackStack
import com.slack.circuit.push
import com.slack.circuit.rememberCircuitNavigator
import com.slack.circuit.sample.di.ActivityKey
import com.slack.circuit.sample.di.AppScope
import com.slack.circuit.sample.home.HomeScreen
import com.slack.circuit.sample.ui.StarTheme
import com.slack.circuit.star.di.ActivityKey
import com.slack.circuit.star.di.AppScope
import com.slack.circuit.star.home.HomeScreen
import com.slack.circuit.star.ui.StarTheme
import com.squareup.anvil.annotations.ContributesMultibinding
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample
package com.slack.circuit.star

import android.app.Application
import com.slack.circuit.sample.di.AppComponent
import com.slack.circuit.star.di.AppComponent

class StarApp : Application() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.data
package com.slack.circuit.star.data

import com.slack.circuit.sample.di.AppScope
import com.slack.circuit.sample.di.SingleIn
import com.slack.circuit.star.di.AppScope
import com.slack.circuit.star.di.SingleIn
import com.squareup.anvil.annotations.ContributesTo
import com.squareup.moshi.Moshi
import dagger.Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.data
package com.slack.circuit.star.data

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import android.app.Activity
import dagger.MapKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import android.app.Activity
import com.slack.circuit.sample.data.DataModule
import com.slack.circuit.star.data.DataModule
import com.squareup.anvil.annotations.MergeComponent
import dagger.Component
import javax.inject.Provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import android.app.Activity
import androidx.lifecycle.ViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import androidx.lifecycle.ViewModel
import com.slack.circuit.CircuitConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import javax.inject.Scope
import kotlin.reflect.KClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import android.app.Activity
import android.app.Application
import android.content.Intent
import androidx.annotation.Keep
import androidx.core.app.AppComponentFactory
import com.slack.circuit.sample.StarApp
import com.slack.circuit.star.StarApp
import javax.inject.Provider

@Keep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.di
package com.slack.circuit.star.di

import androidx.lifecycle.ViewModel
import dagger.MapKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.home
package com.slack.circuit.star.home

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Home
import androidx.compose.material.icons.filled.Info
import androidx.compose.ui.graphics.vector.ImageVector
import com.slack.circuit.Screen
import com.slack.circuit.sample.petlist.AboutScreen
import com.slack.circuit.sample.petlist.Filters
import com.slack.circuit.sample.petlist.PetListScreen
import com.slack.circuit.star.petlist.AboutScreen
import com.slack.circuit.star.petlist.Filters
import com.slack.circuit.star.petlist.PetListScreen

private const val DOGS_SCREEN_NAME = "Adoptables"
private const val ABOUT_SCREEN_NAME = "About"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.home
package com.slack.circuit.star.home

import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.home
package com.slack.circuit.star.home

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -56,15 +56,15 @@ import com.slack.circuit.Screen
import com.slack.circuit.ScreenUi
import com.slack.circuit.Ui
import com.slack.circuit.onNavEvent
import com.slack.circuit.sample.di.AppScope
import com.slack.circuit.sample.home.HomeScreen.Event.ChildNav
import com.slack.circuit.sample.home.HomeScreen.Event.HomeEvent
import com.slack.circuit.sample.home.HomeScreen.Event.PetListFilterEvent
import com.slack.circuit.sample.petlist.Gender
import com.slack.circuit.sample.petlist.PetListFilterPresenter
import com.slack.circuit.sample.petlist.PetListFilterScreen
import com.slack.circuit.sample.petlist.Size
import com.slack.circuit.sample.ui.StarTheme
import com.slack.circuit.star.di.AppScope
import com.slack.circuit.star.home.HomeScreen.Event.ChildNav
import com.slack.circuit.star.home.HomeScreen.Event.HomeEvent
import com.slack.circuit.star.home.HomeScreen.Event.PetListFilterEvent
import com.slack.circuit.star.petlist.Gender
import com.slack.circuit.star.petlist.PetListFilterPresenter
import com.slack.circuit.star.petlist.PetListFilterScreen
import com.slack.circuit.star.petlist.Size
import com.slack.circuit.star.ui.StarTheme
import com.slack.circuit.ui
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.assisted.Assisted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.petdetail
package com.slack.circuit.star.petdetail

import android.content.Context
import android.content.res.Configuration
Expand Down Expand Up @@ -64,13 +64,13 @@ import com.slack.circuit.Screen
import com.slack.circuit.ScreenUi
import com.slack.circuit.Ui
import com.slack.circuit.retained.produceRetainedState
import com.slack.circuit.sample.R
import com.slack.circuit.sample.data.Animal
import com.slack.circuit.sample.di.AppScope
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.ANIMAL_CONTAINER_TAG
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.PROGRESS_TAG
import com.slack.circuit.sample.petdetail.PetDetailTestConstants.UNKNOWN_ANIMAL_TAG
import com.slack.circuit.sample.repo.PetRepository
import com.slack.circuit.star.R
import com.slack.circuit.star.data.Animal
import com.slack.circuit.star.di.AppScope
import com.slack.circuit.star.petdetail.PetDetailTestConstants.ANIMAL_CONTAINER_TAG
import com.slack.circuit.star.petdetail.PetDetailTestConstants.PROGRESS_TAG
import com.slack.circuit.star.petdetail.PetDetailTestConstants.UNKNOWN_ANIMAL_TAG
import com.slack.circuit.star.repo.PetRepository
import com.slack.circuit.ui
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.assisted.Assisted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.slack.circuit.sample.petdetail
package com.slack.circuit.star.petdetail

import android.content.res.Configuration
import android.view.KeyEvent
Expand Down Expand Up @@ -56,8 +56,8 @@ import com.slack.circuit.Presenter
import com.slack.circuit.Screen
import com.slack.circuit.ScreenUi
import com.slack.circuit.Ui
import com.slack.circuit.sample.di.AppScope
import com.slack.circuit.sample.petdetail.PetPhotoCarouselTestConstants.CAROUSEL_TAG
import com.slack.circuit.star.di.AppScope
import com.slack.circuit.star.petdetail.PetPhotoCarouselTestConstants.CAROUSEL_TAG
import com.slack.circuit.ui
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.assisted.Assisted
Expand Down
Loading

0 comments on commit 3f026a0

Please sign in to comment.