mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 22:05:19 +00:00
Disable explicit API for tests (#1483)
* build: disable explicit API for test tasks * Remove `internal` modifier from test classes
This commit is contained in:
@@ -7,7 +7,7 @@ package mozilla.components.lib.publicsuffixlist
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
internal class PublicSuffixListLoaderTest {
|
||||
class PublicSuffixListLoaderTest {
|
||||
@Test
|
||||
fun testLoadingBundledPublicSuffixList() {
|
||||
requireNotNull(javaClass.classLoader).getResourceAsStream("publicsuffixes").buffered().use {
|
||||
|
@@ -68,9 +68,12 @@ class PasswordStorePlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
private fun Project.configureExplicitApi() {
|
||||
configure<KotlinProjectExtension> { explicitApi() }
|
||||
val project = this
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions { freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") }
|
||||
if (!name.contains("test", ignoreCase = true)) {
|
||||
project.configure<KotlinProjectExtension> { explicitApi() }
|
||||
kotlinOptions { freeCompilerArgs += listOf("-Xexplicit-api=strict") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ import kotlinx.coroutines.test.TestCoroutineScope
|
||||
import org.junit.Test
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)
|
||||
internal class PasswordEntryTest {
|
||||
class PasswordEntryTest {
|
||||
|
||||
private fun makeEntry(content: String) =
|
||||
PasswordEntry(fakeClock, testFinder, testScope, content.encodeToByteArray())
|
||||
|
@@ -13,7 +13,7 @@ import java.time.ZoneOffset.UTC
|
||||
/**
|
||||
* Implementation of [UserClock] that is fixed to [Instant.EPOCH] for deterministic time-based tests
|
||||
*/
|
||||
internal class TestUserClock(instant: Instant) : UserClock() {
|
||||
class TestUserClock(instant: Instant) : UserClock() {
|
||||
|
||||
constructor() : this(Instant.EPOCH)
|
||||
|
||||
|
@@ -11,7 +11,7 @@ import kotlin.test.assertNotNull
|
||||
import kotlin.test.assertNull
|
||||
import org.junit.Test
|
||||
|
||||
internal class OtpTest {
|
||||
class OtpTest {
|
||||
|
||||
private fun generateOtp(
|
||||
counter: Long,
|
||||
|
Reference in New Issue
Block a user