Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.intuit.playerui publishing scope #253

Merged
merged 8 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions android/demo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ kt_android_library(
srcs = glob(["src/main/java/**"]),
assets = glob(["src/main/assets/mocks/**"]),
assets_dir = "src/main/assets",
custom_package = "com.intuit.player.android.reference.demo",
custom_package = "com.intuit.playerui.android.reference.demo",
manifest = ":src/main/AndroidManifest.xml",
resource_files = glob(["src/main/res/**"]),
deps = main_deps,
)

android_binary(
name = "demo",
custom_package = "com.intuit.player.android.reference.demo",
custom_package = "com.intuit.playerui.android.reference.demo",
dex_shards = 10,
enable_data_binding = True,
manifest = ":src/main/AndroidManifest.xml",
Expand Down Expand Up @@ -59,7 +59,7 @@ kt_android_library(

android_binary(
name = "demo_test_app",
custom_package = "com.intuit.player.android.reference.demo",
custom_package = "com.intuit.playerui.android.reference.demo",
instruments = ":demo",
manifest = ":src/androidTest/AndroidManifest.xml",
deps = ["demo_ui_test"],
Expand Down
6 changes: 3 additions & 3 deletions android/demo/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt
-keep,includedescriptorclasses class com.intuit.player.android.demo.**$$serializer { *; }
-keepclassmembers class com.intuit.player.android.demo.** {
-keep,includedescriptorclasses class com.intuit.playerui.android.demo.**$$serializer { *; }
-keepclassmembers class com.intuit.playerui.android.demo.** {
*** Companion;
}
-keepclasseswithmembers class com.intuit.player.android.demo.** {
-keepclasseswithmembers class com.intuit.playerui.android.demo.** {
kotlinx.serialization.KSerializer serializer(...);
}
2 changes: 1 addition & 1 deletion android/demo/scripts/androidinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -u -e -o pipefail

adb install -r -d android/demo/demo.apk
adb shell monkey -p com.intuit.player.android.reference.demo 1
adb shell monkey -p com.intuit.playerui.android.reference.demo 1
2 changes: 1 addition & 1 deletion android/demo/scripts/androidtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run():
os.system('adb wait-for-device')
p = sp.Popen("""adb shell 'CLASSPATH=\$(pm path androidx.test.services) app_process / \
androidx.test.services.shellexecutor.ShellMain am instrument -w -e clearPackageData true \
-e targetInstrumentation com.intuit.player.android.reference.demo.test/androidx.test.runner.AndroidJUnitRunner \
-e targetInstrumentation com.intuit.playerui.android.reference.demo.test/androidx.test.runner.AndroidJUnitRunner \
androidx.test.orchestrator/.AndroidTestOrchestrator'""",
shell=True, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)

Expand Down
4 changes: 2 additions & 2 deletions android/demo/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.intuit.player.android.reference.demo.test">
package="com.intuit.playerui.android.reference.demo.test">

<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="30" />
<instrumentation android:targetPackage="com.intuit.player.android.reference.demo"
<instrumentation android:targetPackage="com.intuit.playerui.android.reference.demo"
android:name="androidx.test.runner.AndroidJUnitRunner"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.intuit.player.android.reference.demo.test
package com.intuit.playerui.android.reference.demo.test

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import com.intuit.player.android.reference.demo.test.base.PerformanceTest
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.android.reference.demo.ui.main.MainActivity
import com.intuit.playerui.android.reference.demo.test.base.PerformanceTest
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.android.reference.demo.ui.main.MainActivity
import org.hamcrest.Matchers.allOf
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.test
package com.intuit.playerui.android.reference.demo.test

import android.content.Intent
import android.net.Uri
Expand All @@ -7,9 +7,9 @@ import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.activityScenarioRule
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.android.reference.demo.ui.splash.SplashActivity
import com.intuit.player.jvm.utils.makeFlow
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.android.reference.demo.ui.splash.SplashActivity
import com.intuit.playerui.utils.makeFlow
import org.junit.Rule
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.intuit.player.android.reference.demo.test.assets.action
package com.intuit.playerui.android.reference.demo.test.assets.action

import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.jvm.core.player.state.CompletedState
import com.intuit.player.jvm.core.player.state.ErrorState
import com.intuit.player.jvm.core.player.state.InProgressState
import com.intuit.player.jvm.core.player.state.dataModel
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.core.player.state.CompletedState
import com.intuit.playerui.core.player.state.ErrorState
import com.intuit.playerui.core.player.state.InProgressState
import com.intuit.playerui.core.player.state.dataModel
import org.junit.Assert.assertEquals
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.intuit.player.android.reference.demo.test.assets.collection
package com.intuit.playerui.android.reference.demo.test.assets.collection

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.jvm.core.player.state.InProgressState
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.core.player.state.InProgressState
import org.junit.Test

class CollectionUITest : AssetUITest("reference-assets") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.intuit.player.android.reference.demo.test.assets.info
package com.intuit.playerui.android.reference.demo.test.assets.info

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.jvm.core.player.state.InProgressState
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.core.player.state.InProgressState
import org.junit.Test

class InfoUITest : AssetUITest("reference-assets") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.test.assets.input
package com.intuit.playerui.android.reference.demo.test.assets.input

import android.view.View
import androidx.test.espresso.Espresso.onView
Expand All @@ -10,12 +10,12 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withChild
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.R
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.player.jvm.core.player.state.InProgressState
import com.intuit.player.jvm.core.player.state.dataModel
import com.intuit.playerui.android.reference.demo.R
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.shouldBePlayerState
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.core.player.state.InProgressState
import com.intuit.playerui.core.player.state.dataModel
import org.hamcrest.Matcher
import org.hamcrest.Matchers.allOf
import org.junit.Assert.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.test.assets.text
package com.intuit.playerui.android.reference.demo.test.assets.text

import android.app.Activity.RESULT_CANCELED
import android.app.Instrumentation.ActivityResult
Expand All @@ -11,8 +11,8 @@ import androidx.test.espresso.intent.matcher.IntentMatchers.hasAction
import androidx.test.espresso.intent.matcher.IntentMatchers.hasData
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import org.hamcrest.Matchers.allOf
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.intuit.player.android.reference.demo.test.base
package com.intuit.playerui.android.reference.demo.test.base

import android.view.View
import com.intuit.player.android.asset.RenderableAsset
import com.intuit.player.jvm.core.player.state.PlayerFlowState
import com.intuit.playerui.android.asset.RenderableAsset
import com.intuit.playerui.core.player.state.PlayerFlowState
import org.junit.Assert.assertTrue
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.intuit.player.android.reference.demo.test.base
package com.intuit.playerui.android.reference.demo.test.base

import androidx.test.espresso.intent.Intents
import androidx.test.ext.junit.rules.activityScenarioRule
import com.intuit.player.android.reference.demo.lifecycle.DemoPlayerViewModel
import com.intuit.player.android.reference.demo.ui.main.MainActivity
import com.intuit.player.android.reference.demo.ui.main.MainViewModel
import com.intuit.player.jvm.core.player.state.PlayerFlowState
import com.intuit.player.jvm.utils.mocks.Mock
import com.intuit.playerui.android.reference.demo.lifecycle.DemoPlayerViewModel
import com.intuit.playerui.android.reference.demo.ui.main.MainActivity
import com.intuit.playerui.android.reference.demo.ui.main.MainViewModel
import com.intuit.playerui.core.player.state.PlayerFlowState
import com.intuit.playerui.utils.mocks.Mock
import org.junit.After
import org.junit.Before
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.test.base
package com.intuit.playerui.android.reference.demo.test.base

import android.view.View
import androidx.test.espresso.Espresso.onView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.test.base
package com.intuit.playerui.android.reference.demo.test.base

import android.app.Activity
import android.os.Bundle
Expand Down Expand Up @@ -105,7 +105,7 @@ interface PerformanceTest<T : Activity> {
}

companion object {
const val pkg = "com.intuit.player.android.reference.demo"
const val pkg = "com.intuit.playerui.android.reference.demo"
const val totalFrames = "Total frames rendered"
const val fiftiethPercentile = "50th percentile"
const val ninetiethPercentile = "90th percentile"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.intuit.player.android.reference.demo.test.fragment
package com.intuit.playerui.android.reference.demo.test.fragment

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.scrollTo
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.intuit.player.android.reference.demo.test.base.AssetUITest
import com.intuit.player.android.reference.demo.test.base.waitForViewInRoot
import com.intuit.playerui.android.reference.demo.test.base.AssetUITest
import com.intuit.playerui.android.reference.demo.test.base.waitForViewInRoot
import org.junit.Test

class PlayerFragmentScrollingTest : AssetUITest("misc") {
Expand Down
2 changes: 1 addition & 1 deletion android/demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.intuit.player.android.reference.demo">
package="com.intuit.playerui.android.reference.demo">

<uses-sdk
android:minSdkVersion="24"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.intuit.player.android.reference.demo.lifecycle

import com.intuit.player.android.AndroidPlayer
import com.intuit.player.android.AndroidPlayer.Config
import com.intuit.player.android.lifecycle.PlayerViewModel
import com.intuit.player.android.reference.assets.ReferenceAssetsPlugin
import com.intuit.player.jvm.core.managed.AsyncFlowIterator
import com.intuit.player.jvm.core.player.state.PlayerFlowState
import com.intuit.player.plugins.transactions.PendingTransactionPlugin
import com.intuit.player.plugins.types.CommonTypesPlugin
package com.intuit.playerui.android.reference.demo.lifecycle

import com.intuit.playerui.android.AndroidPlayer
import com.intuit.playerui.android.AndroidPlayer.Config
import com.intuit.playerui.android.lifecycle.PlayerViewModel
import com.intuit.playerui.android.reference.assets.ReferenceAssetsPlugin
import com.intuit.playerui.core.managed.AsyncFlowIterator
import com.intuit.playerui.core.player.state.PlayerFlowState
import com.intuit.playerui.plugins.transactions.PendingTransactionPlugin
import com.intuit.playerui.plugins.types.CommonTypesPlugin
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intuit.player.android.reference.demo.model
package com.intuit.playerui.android.reference.demo.model

import android.content.res.AssetManager
import com.intuit.player.jvm.utils.mocks.Mock
import com.intuit.playerui.utils.mocks.Mock

open class AssetMock(
override val group: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.intuit.player.android.reference.demo.model
package com.intuit.playerui.android.reference.demo.model

import com.intuit.player.jvm.utils.mocks.Mock
import com.intuit.playerui.utils.mocks.Mock

class StringMock(
private val json: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.ui.base
package com.intuit.playerui.android.reference.demo.ui.base

import android.graphics.drawable.GradientDrawable
import android.os.Bundle
Expand All @@ -10,13 +10,13 @@ import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import com.afollestad.materialdialogs.MaterialDialog
import com.alexii.j2v8debugger.StethoHelper
import com.intuit.player.android.lifecycle.ManagedPlayerState
import com.intuit.player.android.lifecycle.PlayerViewModel
import com.intuit.player.android.reference.demo.lifecycle.DemoPlayerViewModel
import com.intuit.player.android.ui.PlayerFragment
import com.intuit.player.jvm.core.bridge.serialization.json.prettify
import com.intuit.player.jvm.core.bridge.toJson
import com.intuit.player.jvm.core.managed.AsyncFlowIterator
import com.intuit.playerui.android.lifecycle.ManagedPlayerState
import com.intuit.playerui.android.lifecycle.PlayerViewModel
import com.intuit.playerui.android.reference.demo.lifecycle.DemoPlayerViewModel
import com.intuit.playerui.android.ui.PlayerFragment
import com.intuit.playerui.core.bridge.serialization.json.prettify
import com.intuit.playerui.core.bridge.toJson
import com.intuit.playerui.core.managed.AsyncFlowIterator
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intuit.player.android.reference.demo.ui.main
package com.intuit.playerui.android.reference.demo.ui.main

import android.os.Bundle
import android.view.Menu
Expand All @@ -20,13 +20,13 @@ import androidx.navigation.ui.onNavDestinationSelected
import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import com.google.android.material.navigation.NavigationView
import com.intuit.player.android.reference.demo.R
import com.intuit.player.android.reference.demo.model.AssetMock
import com.intuit.player.android.reference.demo.model.StringMock
import com.intuit.player.android.ui.PlayerFragment
import com.intuit.player.jvm.utils.mocks.ClassLoaderMock
import com.intuit.player.jvm.utils.mocks.Mock
import com.intuit.player.jvm.utils.mocks.getFlow
import com.intuit.playerui.android.reference.demo.R
import com.intuit.playerui.android.reference.demo.model.AssetMock
import com.intuit.playerui.android.reference.demo.model.StringMock
import com.intuit.playerui.android.ui.PlayerFragment
import com.intuit.playerui.utils.mocks.ClassLoaderMock
import com.intuit.playerui.utils.mocks.Mock
import com.intuit.playerui.utils.mocks.getFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch

Expand Down
Loading