diff --git a/app/build.gradle b/app/build.gradle index 1afb16fe0e1d..c529fbc4207f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,7 +77,7 @@ android { } ext { - supportLibrary = "27.1.1" + supportLibrary = "28.0.0-rc01" architectureComponents = "1.1.1" architectureComponentsExtensions = "1.1.1" androidKtx = "0.3" @@ -91,6 +91,7 @@ ext { dependencies { + implementation "com.android.support:support-v4:$supportLibrary" debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4' releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' diff --git a/app/src/androidTest/java/com/duckduckgo/app/fire/FireViewModelTest.kt b/app/src/androidTest/java/com/duckduckgo/app/fire/FireViewModelTest.kt new file mode 100644 index 000000000000..60d31e1b337e --- /dev/null +++ b/app/src/androidTest/java/com/duckduckgo/app/fire/FireViewModelTest.kt @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2018 DuckDuckGo + * + * 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.duckduckgo.app.fire + +import android.arch.core.executor.testing.InstantTaskExecutorRule +import android.support.test.annotation.UiThreadTest +import com.duckduckgo.app.InstantSchedulersRule +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Rule +import org.junit.Test + + +class FireViewModelTest { + + @Rule + @JvmField + val schedulers = InstantSchedulersRule() + + @Rule + @JvmField + var instantTaskExecutorRule = InstantTaskExecutorRule() + + private lateinit var viewState: FireViewModel.ViewState + private lateinit var testee: FireViewModel + + @UiThreadTest + @Before + fun setup() { + testee = FireViewModel() + testee.viewState.observeForever { viewState = it!! } + } + + @Test + fun whenViewModelInitialisedThenAutoStartEnabled() { + assertTrue(viewState.autoStart) + } + + @Test + fun whenViewModelInitialisedThenAnimationEnabled() { + assertTrue(viewState.animate) + } + + @Test + fun whenTimerReachedThenAnimationDisabled() { + testee.startDeathClock() + assertFalse(viewState.animate) + } + + @Test + fun whenUserLeftActivityThenAutoStartDisabled() { + testee.onViewStopped() + assertFalse(viewState.autoStart) + } + + @Test + fun whenUserLeftActivityThenReturnedThenAutoStartEnabled() { + testee.onViewStopped() + assertFalse(viewState.autoStart) + + testee.onViewRestarted() + assertTrue(viewState.autoStart) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 262f7f9bfc97..09b683f44a8d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,6 @@ android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"> - @@ -38,12 +37,11 @@ - + android:label="@string/appName" + android:theme="@style/AppTheme.TransparentTheme" /> + + \ No newline at end of file diff --git a/app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarksActivity.kt b/app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarksActivity.kt index 5fc6f31b6137..24009de25885 100644 --- a/app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarksActivity.kt +++ b/app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarksActivity.kt @@ -172,7 +172,7 @@ class BookmarksActivity : DuckDuckGoActivity() { } } - class BookmarksViewHolder(itemView: View?, private val viewModel: BookmarksViewModel) : + class BookmarksViewHolder(itemView: View, private val viewModel: BookmarksViewModel) : ViewHolder(itemView) { lateinit var bookmark: BookmarkEntity diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt index 3938cdf2c64f..47aede2e9e24 100644 --- a/app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt +++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt @@ -36,6 +36,7 @@ import com.duckduckgo.app.global.view.FireDialog import com.duckduckgo.app.privacy.ui.PrivacyDashboardActivity import com.duckduckgo.app.settings.SettingsActivity import com.duckduckgo.app.statistics.pixels.Pixel +import com.duckduckgo.app.statistics.pixels.Pixel.PixelName.FORGET_ALL_EXECUTED import com.duckduckgo.app.tabs.model.TabEntity import com.duckduckgo.app.tabs.ui.TabSwitcherActivity import org.jetbrains.anko.longToast @@ -79,10 +80,11 @@ class BrowserActivity : DuckDuckGoActivity() { private fun openNewTab(tabId: String, url: String? = null) { val fragment = BrowserTabFragment.newInstance(tabId, url) val transaction = supportFragmentManager.beginTransaction() - if (currentTab == null) { + val tab = currentTab + if (tab == null) { transaction.replace(R.id.fragmentContainer, fragment, tabId) } else { - transaction.hide(currentTab) + transaction.hide(tab) transaction.add(R.id.fragmentContainer, fragment, tabId) } transaction.commit() @@ -120,14 +122,20 @@ class BrowserActivity : DuckDuckGoActivity() { return } - if (intent.getBooleanExtra(PERFORM_FIRE_ON_ENTRY_EXTRA, false) ) { + if (intent.getBooleanExtra(PERFORM_FIRE_ON_ENTRY_EXTRA, false)) { viewModel.onClearRequested() - clearPersonalDataAction.clear { viewModel.onClearComplete() } + clearPersonalDataAction.clear() Toast.makeText(applicationContext, R.string.fireDataCleared, Toast.LENGTH_LONG).show() finish() return } + if (intent.getBooleanExtra(LAUNCHED_FROM_FIRE_EXTRA, false)) { + Timber.i("Launched from fire") + Toast.makeText(applicationContext, R.string.fireDataCleared, Toast.LENGTH_LONG).show() + pixel.fire(FORGET_ALL_EXECUTED) + } + if (launchNewSearch(intent)) { viewModel.onNewTabRequested() return @@ -232,15 +240,17 @@ class BrowserActivity : DuckDuckGoActivity() { companion object { - fun intent(context: Context, queryExtra: String? = null, newSearch: Boolean = false): Intent { + fun intent(context: Context, queryExtra: String? = null, newSearch: Boolean = false, launchedFromFireAction: Boolean = false): Intent { val intent = Intent(context, BrowserActivity::class.java) intent.putExtra(EXTRA_TEXT, queryExtra) intent.putExtra(NEW_SEARCH_EXTRA, newSearch) + intent.putExtra(LAUNCHED_FROM_FIRE_EXTRA, launchedFromFireAction) return intent } const val NEW_SEARCH_EXTRA = "NEW_SEARCH_EXTRA" const val PERFORM_FIRE_ON_ENTRY_EXTRA = "PERFORM_FIRE_ON_ENTRY_EXTRA" + const val LAUNCHED_FROM_FIRE_EXTRA = "LAUNCHED_FROM_FIRE_EXTRA" private const val DASHBOARD_REQUEST_CODE = 100 } diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt index fb625c3c6e5a..a05ab9c9fec3 100644 --- a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt +++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt @@ -469,8 +469,8 @@ class BrowserTabFragment : Fragment(), FindListener { private fun configureToolbar() { toolbar.inflateMenu(R.menu.menu_browser_activity) - toolbar.setOnMenuItemClickListener { - when (it.itemId) { + toolbar.setOnMenuItemClickListener { menuItem -> + when (menuItem.itemId) { R.id.fire -> { browserActivity?.launchFire() return@setOnMenuItemClickListener true @@ -714,7 +714,7 @@ class BrowserTabFragment : Fragment(), FindListener { } private fun resetTabState() { - omnibarTextInput.text.clear() + omnibarTextInput.text?.clear() viewModel.resetView() destroyWebView() configureWebView() diff --git a/app/src/main/java/com/duckduckgo/app/di/AndroidBindingModule.kt b/app/src/main/java/com/duckduckgo/app/di/AndroidBindingModule.kt index defec5f4e6cc..42cedce847a2 100644 --- a/app/src/main/java/com/duckduckgo/app/di/AndroidBindingModule.kt +++ b/app/src/main/java/com/duckduckgo/app/di/AndroidBindingModule.kt @@ -21,6 +21,7 @@ import com.duckduckgo.app.browser.BrowserActivity import com.duckduckgo.app.browser.BrowserTabFragment import com.duckduckgo.app.browser.defaultBrowsing.DefaultBrowserInfoActivity import com.duckduckgo.app.feedback.ui.FeedbackActivity +import com.duckduckgo.app.fire.FireActivity import com.duckduckgo.app.job.AppConfigurationJobService import com.duckduckgo.app.launch.LaunchActivity import com.duckduckgo.app.onboarding.ui.OnboardingActivity @@ -87,6 +88,10 @@ abstract class AndroidBindingModule { @ContributesAndroidInjector abstract fun defaultBrowserInfoActivity(): DefaultBrowserInfoActivity + @ActivityScoped + @ContributesAndroidInjector + abstract fun fireActivity(): FireActivity + /* Fragments */ @ContributesAndroidInjector diff --git a/app/src/main/java/com/duckduckgo/app/fire/FireActivity.kt b/app/src/main/java/com/duckduckgo/app/fire/FireActivity.kt new file mode 100644 index 000000000000..36f9b4a3d3c0 --- /dev/null +++ b/app/src/main/java/com/duckduckgo/app/fire/FireActivity.kt @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2018 DuckDuckGo + * + * 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.duckduckgo.app.fire + +import android.animation.Animator +import android.animation.AnimatorListenerAdapter +import android.app.Activity +import android.app.ActivityManager +import android.arch.lifecycle.Observer +import android.arch.lifecycle.ViewModelProviders +import android.content.Context +import android.content.Intent +import android.os.Bundle +import android.os.Process +import android.support.v4.app.ActivityOptionsCompat +import com.duckduckgo.app.browser.BrowserActivity +import com.duckduckgo.app.browser.R +import com.duckduckgo.app.global.DuckDuckGoActivity +import com.duckduckgo.app.global.ViewModelFactory +import kotlinx.android.synthetic.main.activity_fire.* +import javax.inject.Inject + +/** + * Activity which is responsible for killing the main process and restarting it. This Activity will automatically finish itself after a brief time. + * + * This Activity runs in a separate process so that it can seamlessly restart the main app process without much in the way of a jarring UX. + * + * The correct way to invoke this Activity is through its `triggerRestart(context)` method. + * + * This Activity was largely inspired by https://github.com/JakeWharton/ProcessPhoenix + * + * We need to detect the user leaving this activity and possibly returning to it: + * if the user left our app to do something else, restarting our browser activity would feel wrong + * if the user left our app but came back, we should restart the browser activity + */ +class FireActivity : DuckDuckGoActivity() { + + @Inject + lateinit var viewModelFactory: ViewModelFactory + + private val viewModel: FireViewModel by lazy { + ViewModelProviders.of(this, viewModelFactory).get(FireViewModel::class.java) + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_fire) + if (savedInstanceState == null) { + + fireAnimationView.addAnimatorListener(object : AnimatorListenerAdapter() { + override fun onAnimationStart(animator: Animator?) { + viewModel.startDeathClock() + } + }) + } + + viewModel.viewState.observe(this, Observer { + it?.let { viewState -> + if (!viewState.animate) { + + // restart the app only if the user hasn't navigated away during the fire animation + if (viewState.autoStart) { + val intent = intent.getParcelableExtra(KEY_RESTART_INTENTS) + startActivity(intent, activityFadeOptions(this)) + } + + viewModel.viewState.removeObservers(this) + finish() + killProcess() + } + } + }) + } + + override fun onStop() { + super.onStop() + + if (!isChangingConfigurations) { + viewModel.onViewStopped() + } + } + + override fun onRestart() { + super.onRestart() + viewModel.onViewRestarted() + } + + override fun onBackPressed() { + // do nothing - the activity will kill itself soon enough + } + + companion object { + private const val KEY_RESTART_INTENTS = "KEY_RESTART_INTENTS" + + fun triggerRestart(context: Context) { + triggerRestart(context, getRestartIntent(context)) + } + + private fun triggerRestart(context: Context, nextIntent: Intent) { + val intent = Intent(context, FireActivity::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + intent.putExtra(KEY_RESTART_INTENTS, nextIntent) + + context.startActivity(intent, activityFadeOptions(context)) + if (context is Activity) { + context.finish() + } + killProcess() + } + + private fun getRestartIntent(context: Context): Intent { + val intent = BrowserActivity.intent(context, launchedFromFireAction = true) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK) + return intent + } + + private fun killProcess() { + Runtime.getRuntime().exit(0) + } + + fun appRestarting(context: Context): Boolean { + val currentProcessId = Process.myPid() + val activityManager: ActivityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager + activityManager.runningAppProcesses?.forEach { + if (it.pid == currentProcessId && it.processName.endsWith(context.getString(R.string.fireProcessName))) { + return true + } + } + return false + } + + private fun activityFadeOptions(context: Context): Bundle? { + val config = ActivityOptionsCompat.makeCustomAnimation(context, android.R.anim.fade_in, android.R.anim.fade_out) + return config.toBundle() + } + } +} diff --git a/app/src/main/java/com/duckduckgo/app/fire/FireViewModel.kt b/app/src/main/java/com/duckduckgo/app/fire/FireViewModel.kt new file mode 100644 index 000000000000..74a1f691c749 --- /dev/null +++ b/app/src/main/java/com/duckduckgo/app/fire/FireViewModel.kt @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2018 DuckDuckGo + * + * 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.duckduckgo.app.fire + +import android.arch.lifecycle.MutableLiveData +import android.arch.lifecycle.ViewModel +import io.reactivex.Completable +import io.reactivex.android.schedulers.AndroidSchedulers +import io.reactivex.disposables.Disposable +import java.util.concurrent.TimeUnit + + +class FireViewModel : ViewModel() { + + private var disposable: Disposable? = null + + val viewState: MutableLiveData = MutableLiveData().apply { + value = ViewState() + } + + fun startDeathClock() { + disposable = Completable.complete() + .delay(ANIMATION_FINISH_DELAY_MS, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe { + viewState.value = currentViewState().copy(animate = false) + } + } + + fun onViewStopped() { + viewState.value = currentViewState().copy(autoStart = false) + } + + fun onViewRestarted() { + viewState.value = currentViewState().copy(autoStart = true) + } + + private fun currentViewState(): ViewState { + return viewState.value!! + } + + data class ViewState( + val animate: Boolean = true, + val autoStart: Boolean = true + ) + + companion object { + private const val ANIMATION_FINISH_DELAY_MS = 1500L + } +} \ No newline at end of file diff --git a/app/src/main/java/com/duckduckgo/app/global/DuckDuckGoApplication.kt b/app/src/main/java/com/duckduckgo/app/global/DuckDuckGoApplication.kt index c20c7d197f56..abade181e9a0 100644 --- a/app/src/main/java/com/duckduckgo/app/global/DuckDuckGoApplication.kt +++ b/app/src/main/java/com/duckduckgo/app/global/DuckDuckGoApplication.kt @@ -27,6 +27,7 @@ import android.os.Build import android.support.v4.app.Fragment import com.duckduckgo.app.browser.BuildConfig import com.duckduckgo.app.di.DaggerAppComponent +import com.duckduckgo.app.fire.FireActivity import com.duckduckgo.app.global.install.AppInstallStore import com.duckduckgo.app.global.notification.NotificationRegistrar import com.duckduckgo.app.global.shortcut.AppShortcutCreator @@ -91,9 +92,12 @@ open class DuckDuckGoApplication : HasActivityInjector, HasServiceInjector, HasS if (!installLeakCanary()) return - ProcessLifecycleOwner.get().lifecycle.addObserver(this) - configureDependencyInjection() configureLogging() + configureDependencyInjection() + + if (appIsRestarting()) return + + ProcessLifecycleOwner.get().lifecycle.addObserver(this) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { appShortcutCreator.configureAppShortcuts(this) @@ -122,6 +126,14 @@ open class DuckDuckGoApplication : HasActivityInjector, HasServiceInjector, HasS return true } + private fun appIsRestarting(): Boolean { + if (FireActivity.appRestarting(this)) { + Timber.i("App restarting") + return true + } + return false + } + private fun migrateLegacyDb() { doAsync { migration.start { favourites, searches -> diff --git a/app/src/main/java/com/duckduckgo/app/global/ViewModelFactory.kt b/app/src/main/java/com/duckduckgo/app/global/ViewModelFactory.kt index 209bbf8eca8b..19811686d995 100644 --- a/app/src/main/java/com/duckduckgo/app/global/ViewModelFactory.kt +++ b/app/src/main/java/com/duckduckgo/app/global/ViewModelFactory.kt @@ -29,6 +29,7 @@ import com.duckduckgo.app.browser.omnibar.QueryUrlConverter import com.duckduckgo.app.browser.session.WebViewSessionStorage import com.duckduckgo.app.feedback.api.FeedbackSender import com.duckduckgo.app.feedback.ui.FeedbackViewModel +import com.duckduckgo.app.fire.FireViewModel import com.duckduckgo.app.global.db.AppConfigurationDao import com.duckduckgo.app.global.model.SiteFactory import com.duckduckgo.app.launch.LaunchViewModel @@ -95,6 +96,7 @@ class ViewModelFactory @Inject constructor( isAssignableFrom(FeedbackViewModel::class.java) -> FeedbackViewModel(feedbackSender) isAssignableFrom(SettingsViewModel::class.java) -> SettingsViewModel(appSettingsPreferencesStore, defaultBrowserDetector, variantManager) isAssignableFrom(BookmarksViewModel::class.java) -> BookmarksViewModel(bookmarksDao) + isAssignableFrom(FireViewModel::class.java) -> FireViewModel() else -> throw IllegalArgumentException("Unknown ViewModel class: ${modelClass.name}") } } as T diff --git a/app/src/main/java/com/duckduckgo/app/global/view/ClearPersonalDataAction.kt b/app/src/main/java/com/duckduckgo/app/global/view/ClearPersonalDataAction.kt index bb390b1674f4..5f7715955553 100644 --- a/app/src/main/java/com/duckduckgo/app/global/view/ClearPersonalDataAction.kt +++ b/app/src/main/java/com/duckduckgo/app/global/view/ClearPersonalDataAction.kt @@ -21,6 +21,8 @@ import android.webkit.CookieManager import android.webkit.WebStorage import android.webkit.WebView import com.duckduckgo.app.browser.WebDataManager +import com.duckduckgo.app.fire.FireActivity +import timber.log.Timber import javax.inject.Inject class ClearPersonalDataAction @Inject constructor( @@ -28,9 +30,12 @@ class ClearPersonalDataAction @Inject constructor( private val dataManager: WebDataManager ) { - fun clear(clearComplete: (() -> Unit)) { + fun clear() { dataManager.clearData(WebView(context), WebStorage.getInstance(), context) dataManager.clearWebViewSessions() - dataManager.clearExternalCookies(CookieManager.getInstance(), clearComplete) + dataManager.clearExternalCookies(CookieManager.getInstance()) { + Timber.i("Finished clearing everything; restarting process") + FireActivity.triggerRestart(context) + } } } \ No newline at end of file diff --git a/app/src/main/java/com/duckduckgo/app/global/view/FireDialog.kt b/app/src/main/java/com/duckduckgo/app/global/view/FireDialog.kt index 921a0f13461e..c7f478f35910 100644 --- a/app/src/main/java/com/duckduckgo/app/global/view/FireDialog.kt +++ b/app/src/main/java/com/duckduckgo/app/global/view/FireDialog.kt @@ -21,9 +21,7 @@ import android.os.Bundle import android.support.design.widget.BottomSheetDialog import android.view.View import com.duckduckgo.app.browser.R -import com.duckduckgo.app.browser.WebDataManager import com.duckduckgo.app.statistics.pixels.Pixel -import com.duckduckgo.app.statistics.pixels.Pixel.PixelName.* import kotlinx.android.synthetic.main.sheet_fire_clear_data.* class FireDialog( @@ -46,8 +44,7 @@ class FireDialog( clearAllOption.setOnClickListener { clearStarted() - pixel.fire(FORGET_ALL_EXECUTED) - performClear(clearComplete) + clearPersonalDataAction.clear() dismiss() } @@ -55,9 +52,4 @@ class FireDialog( dismiss() } } - - fun performClear(clearComplete: () -> Unit) { - clearPersonalDataAction.clear(clearComplete) - } - } \ No newline at end of file diff --git a/app/src/main/res/layout/activity_browser.xml b/app/src/main/res/layout/activity_browser.xml index a328d7925641..47bd9f295d57 100644 --- a/app/src/main/res/layout/activity_browser.xml +++ b/app/src/main/res/layout/activity_browser.xml @@ -22,7 +22,7 @@ android:layout_height="match_parent" app:layout_scrollFlags="scroll|enterAlways" tools:context="com.duckduckgo.app.browser.BrowserActivity" - tools:menu="menu_browser_activity"> + tools:menu="@menu/menu_browser_activity"> + + + + + + + diff --git a/app/src/main/res/layout/sheet_fire_clear_data.xml b/app/src/main/res/layout/sheet_fire_clear_data.xml index 45901adcaf09..576912f0bb0c 100644 --- a/app/src/main/res/layout/sheet_fire_clear_data.xml +++ b/app/src/main/res/layout/sheet_fire_clear_data.xml @@ -24,40 +24,43 @@ + android:textStyle="normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/raw/flame_v2.json b/app/src/main/res/raw/flame_v2.json new file mode 100644 index 000000000000..ada8feb00e88 --- /dev/null +++ b/app/src/main/res/raw/flame_v2.json @@ -0,0 +1 @@ +{"v":"5.2.1","fr":60,"ip":0,"op":121,"w":240,"h":480,"nm":"v2","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"ember-L","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":5,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":85,"s":[100],"e":[0]},{"t":90}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":0,"s":[86.802,201.735,0],"e":[86.802,90.735,0],"to":[0,-18.5,0],"ti":[0,18.5,0]},{"t":90}],"ix":2},"a":{"a":0,"k":[2.793,6.527,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,-2.37],[0,0],[0,0],[0,2.38]],"o":[[0,0],[2.37,0],[0,0],[0,0],[-2.37,0],[0,0]],"v":[[0,0],[0,0],[4.19,4.19],[4.19,9.79],[4.19,9.79],[0,5.59]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.866666972637,0.462745010853,0.341176003218,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[133.333,133.333],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"ember-M","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":-37,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":-32,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":8,"s":[100],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":13,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":23,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":28,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":68,"s":[100],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":73,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":83,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":88,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":128,"s":[100],"e":[0]},{"t":133}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-37,"s":[117.132,136.495,0],"e":[117.132,16.495,0],"to":[0,-20,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":13,"s":[117.132,16.495,0],"e":[117.132,136.495,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":23,"s":[117.132,136.495,0],"e":[117.132,16.495,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":73,"s":[117.132,16.495,0],"e":[117.132,136.495,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":83,"s":[117.132,136.495,0],"e":[117.132,16.495,0],"to":[0,0,0],"ti":[0,20,0]},{"t":133}],"ix":2},"a":{"a":0,"k":[2.793,8.387,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,2.38],[0,0],[0,0],[0,-2.37]],"o":[[0,0],[2.37,0],[0,0],[0,0],[-2.37,0],[0,0]],"v":[[0,12.58],[0,12.58],[4.19,8.39],[4.19,0],[4.19,0],[0,4.19]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.866666972637,0.462745010853,0.341176003218,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[133.333,133.333],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":-37,"op":203,"st":-37,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"ember-R","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":37,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":42,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":112,"s":[100],"e":[0]},{"t":117}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":37,"s":[159.132,169.495,0],"e":[159.132,109.495,0],"to":[0,-10,0],"ti":[0,10,0]},{"t":117}],"ix":2},"a":{"a":0,"k":[2.793,8.387,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,2.38],[0,0],[0,0],[0,-2.37]],"o":[[0,0],[2.37,0],[0,0],[0,0],[-2.37,0],[0,0]],"v":[[0,12.58],[0,12.58],[4.19,8.39],[4.19,0],[4.19,0],[0,4.19]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.866666972637,0.462745010853,0.341176003218,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[133.333,133.333],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"flame_inner","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.381,69.366,0],"ix":2},"a":{"a":0,"k":[10.616,9.625,0],"ix":1},"s":{"a":0,"k":[200,200,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[6.79,7.4],[17.21,4.41],[0,-0.16],[-12.3,10.62]],"o":[[0,15.79],[0,0],[2.03,4.22],[6.88,-5.94]],"v":[[26.08,0],[0,20.32],[0,20.48],[27.28,24.17]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.844439983368,0.541962981224,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[66.667,66.667],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"flame_outer","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":0,"s":[118.642,247.615,0],"e":[118.642,262.615,0],"to":[0,2.5,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":20,"s":[118.642,262.615,0],"e":[118.642,247.615,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":40,"s":[118.642,247.615,0],"e":[118.642,262.615,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":60,"s":[118.642,262.615,0],"e":[118.642,247.615,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":80,"s":[118.642,247.615,0],"e":[118.642,262.615,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":100,"s":[118.642,262.615,0],"e":[118.642,247.615,0],"to":[0,0,0],"ti":[0,2.5,0]},{"t":120}],"ix":2},"a":{"a":0,"k":[41.367,50.513,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.47,5.31],[3.21,1.54],[1.67,1.68],[-1.12,3.77],[0,0.14],[-0.42,0.7],[0.14,0],[0,0],[0,0],[0.28,0],[0,0],[0,-7.41],[0,-6.43],[6.84,-0.28],[0.28,0],[0,6.71],[-0.28,1.11],[0.28,0],[0,-0.14],[-0.28,-8.25],[-10.06,-4.89],[-0.14,0],[0,0],[-0.42,-0.28],[0,0],[0,0],[0,-0.14],[-0.42,-0.14],[-0.28,-0.14],[-0.7,-0.14],[-0.7,-0.14],[0,0],[-0.7,-0.14],[-0.42,0],[-0.69,0],[0,17.19]],"o":[[-2.37,-2.8],[-2.51,-1.25],[-2.8,-2.8],[0,-0.14],[0.28,-0.98],[-0.14,0],[0,0],[0,0],[-0.28,0],[0,0],[-3.49,0.84],[0,7.55],[0,4.47],[-0.14,0],[-6.71,0],[0,-1.26],[0.14,-0.28],[-0.14,0],[-4.89,5.73],[0.56,11.6],[0,0],[0,0],[0.56,0.28],[0,0],[0,0],[0,0],[0.42,0.14],[0.27,0.14],[0.7,0.28],[0.7,0.14],[0,0],[0.55,0.14],[0.42,0],[0.7,0],[17.19,0],[0,-7.41]],"v":[[54.92,24.89],[46.4,18.45],[39.98,13.7],[37.18,2.94],[37.32,2.52],[38.58,0],[37.74,0.14],[37.6,0.14],[37.46,0.14],[36.76,0.28],[36.76,0.28],[27.68,13],[30.34,29.64],[20.28,40.96],[19.72,40.96],[7.56,28.8],[8.12,25.03],[7.7,24.47],[7.42,24.61],[0.02,46.14],[17.62,72.7],[17.9,72.7],[17.76,72.7],[19.3,73.4],[19.3,73.4],[19.44,73.4],[19.58,73.54],[20.84,73.96],[21.53,74.24],[23.63,74.8],[25.73,75.22],[25.73,75.22],[27.54,75.5],[28.66,75.63],[30.89,75.77],[62.05,44.6]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.866666972637,0.462745010853,0.341176003218,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[133.333,133.333],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"shadow","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[25],"e":[35]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":20,"s":[35],"e":[25]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":40,"s":[25],"e":[35]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":60,"s":[35],"e":[25]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":80,"s":[25],"e":[35]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":100,"s":[35],"e":[25]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":120,"s":[25],"e":[35]},{"t":140}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[118.352,363.505,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":0,"s":[135,135,100],"e":[150,150,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":20,"s":[150,150,100],"e":[135,135,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":40,"s":[135,135,100],"e":[150,150,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":60,"s":[150,150,100],"e":[135,135,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":80,"s":[135,135,100],"e":[150,150,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":100,"s":[150,150,100],"e":[135,135,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":120,"s":[135,135,100],"e":[150,150,100]},{"t":140}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[70,18],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.866666972637,0.462745010853,0.341176003218,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[133.333,133.333],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"shadow","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e0bb24154385..d4ab5c9ba071 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -153,6 +153,7 @@ Clear All Tabs and Data Cancel Data cleared + :fire Settings diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index e81521a91d02..c10cc5cbaa99 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -153,7 +153,7 @@ normal - - @@ -254,4 +254,8 @@ 6sp + + diff --git a/bitrise.yml b/bitrise.yml index 2f2205ec48be..fcfc46207f66 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -2,13 +2,27 @@ format_version: '5' default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android -trigger_map: -- push_branch: "*" - workflow: primary -- pull_request_source_branch: "*" - workflow: primary workflows: - primary: + vdt: + steps: + - activate-ssh-key: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4.0.11: {} + - cache-pull@2.0.1: {} + - install-missing-android-tools@2.2.0: {} + - gradle-runner@1.8.3: + inputs: + - gradle_task: assembleDebug assembleDebugAndroidTest + title: Build APK + - virtual-device-testing-for-android@1.0.2: + inputs: + - test_devices: |- + NexusLowRes,26,en,portrait + Nexus4,21,en,portrait + - test_type: instrumentation + - deploy-to-bitrise-io: {} + - cache-push@2.0.5: {} + primary-backup: steps: - avd-manager@0.9.2: inputs: @@ -59,3 +73,8 @@ app: - opts: is_expand: false TEST_VARIANT: Debug +trigger_map: +- push_branch: feature/* + workflow: vdt +- pull_request_source_branch: "*" + workflow: vdt diff --git a/build.gradle b/build.gradle index 671b7995c3e4..d4953fb5438d 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.0-beta05' + classpath 'com.android.tools.build:gradle:3.2.0-rc01' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong