Skip to content

Commit

Permalink
Merge pull request #406 from hannesa2/Java17
Browse files Browse the repository at this point in the history
Java 17
  • Loading branch information
hannesa2 authored May 14, 2024
2 parents 5b60b21 + 0a9593c commit 4fc0a4f
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 1,083 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Android-CI-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 11
java-version: 17
- name: "Build Changelog"
id: changelog
uses: mikepenz/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import org.gradle.internal.jvm.Jvm
buildscript {
ext {
// SDK
sdkCompileVersion = 33
sdkCompileVersion = 34
sdkMinVersion = 24
sdkTargetVersion = 33
sdkTargetVersion = 34
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
implementation 'com.google.firebase:firebase-analytics:21.2.0'
implementation 'com.google.firebase:firebase-crashlytics:18.4.1'

implementation 'com.github.hannesa2:githubAppUpdate:2.0'
implementation 'com.github.hannesa2:githubAppUpdate:2.3.1'

// Data and domain modules
implementation project(':owncloudDomain')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ class FileDisplayActivity : FileActivity(),
FileListOption.ALL_FILES -> getString(R.string.default_display_name_for_root_folder)
FileListOption.SPACES_LIST -> getString(R.string.bottom_nav_spaces)
}
setupRootToolbar(title= title, isSearchEnabled = true, isAvatarRequested = false)
setupRootToolbar(title = title, isSearchEnabled = true, isAvatarRequested = false)
} else if (space?.isProject == true && chosenFile.remotePath == OCFile.ROOT_PATH) {
updateStandardToolbar(title = space.name, displayHomeAsUpEnabled = true, homeButtonEnabled = true)
} else {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@
package com.owncloud.android.presentation.viewmodels

import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.lifecycle.LiveData
import com.owncloud.android.domain.utils.Event
import com.owncloud.android.presentation.common.UIResult
import com.owncloud.android.providers.CoroutinesDispatcherProvider
import com.owncloud.android.testutil.livedata.getEmittedValues
import io.mockk.unmockkAll
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.resetMain
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Rule

@ExperimentalCoroutinesApi
Expand All @@ -41,29 +34,11 @@ open class ViewModelTest {
@JvmField
val instantExecutorRule = InstantTaskExecutorRule()

val testCoroutineDispatcher = TestCoroutineDispatcher()
val coroutineDispatcherProvider: CoroutinesDispatcherProvider = CoroutinesDispatcherProvider(
io = testCoroutineDispatcher,
main = testCoroutineDispatcher,
computation = testCoroutineDispatcher
)

@After
open fun tearDown() {
Dispatchers.resetMain()
testCoroutineDispatcher.cleanupTestCoroutines()

unmockkAll()
}

fun <DomainModel> assertEmittedValues(
expectedValues: List<Event<UIResult<DomainModel>>>,
liveData: LiveData<Event<UIResult<DomainModel>>>
) {
val emittedValues = liveData.getEmittedValues(expectedValues.size) {
testCoroutineDispatcher.resumeDispatcher()
}
assertEquals(expectedValues, emittedValues)
}

}
Loading

0 comments on commit 4fc0a4f

Please sign in to comment.