This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val configuration = project.configurations.getByName("prodConsumerReleaseRuntimeClasspath") | |
val artifactType = Attribute.of("artifactType", String::class.java) | |
// Some plugin can only work with configurations, while the Android Gradle Plugin (AGP) has the newer "artifact view" | |
// paradigm implemented. This makes it impossible to resolve most of the created, variant-aware | |
// configurations from AGP "by hand" without getting unmatched attribute exceptions. | |
// We now pick one artifact that holds our dependencies and add a custom compatibility rule | |
// for it which basically accepts all incoming compatibility issues as long as the produced value | |
// on "the other side" is a JAR or AAR artifact. | |
configuration.attributes { | |
attribute(artifactType, "android-classes-directory") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.cancel | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.SharingStarted | |
import kotlinx.coroutines.flow.flow | |
import kotlinx.coroutines.flow.onCompletion | |
import kotlinx.coroutines.flow.shareIn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<application> | |
<activity | |
android:name="androidx.activity.ComponentActivity" | |
android:exported="false"/> | |
</application> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HiltFragmentScenario<F : Fragment> private constructor( | |
private val fragmentClass: Class<F>, | |
val activityScenario: ActivityScenario<TestHiltActivity> | |
) { | |
@Suppress("UNCHECKED_CAST") | |
val fragment: F? | |
get() = activityScenario.getActivity()?.supportFragmentManager?.findFragmentByTag(FRAGMENT_TAG) as? F? | |
/** | |
* Moves Fragment state to a new state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("EXPERIMENTAL_API_USAGE", "EXPERIMENTAL_UNSIGNED_LITERALS") | |
interface ExactSizeIterator<T> : Iterator<T> { | |
val length: UInt | |
} | |
fun <T> Collection<T>.exactSizeIterator() = object : ExactSizeIterator<T> { | |
private val inner = iterator() | |
override val length: UInt = size.toUInt() | |
override fun hasNext(): Boolean = inner.hasNext() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ViewMatchers | |
{ | |
@SuppressWarnings("unchecked") | |
public static Matcher<View> withRecyclerView(@IdRes int viewId) | |
{ | |
return allOf(isAssignableFrom(RecyclerView.class), withId(viewId)); | |
} | |
@SuppressWarnings("unchecked") | |
public static ViewInteraction onRecyclerItemView(@IdRes int identifyingView, Matcher<View> identifyingMatcher, Matcher<View> childMatcher) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.auto.service.AutoService | |
import org.robolectric.internal.dependency.DependencyResolver | |
import org.robolectric.pluginapi.SdkProvider | |
import org.apache.maven.artifact.ant.DependenciesTask | |
import org.robolectric.internal.dependency.DependencyJar | |
import java.io.IOException | |
import java.nio.channels.FileLock | |
import java.nio.channels.FileChannel | |
import java.io.RandomAccessFile | |
import java.io.File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package some.package | |
import nl.javadude.gradle.plugins.license.DownloadLicensesExtension | |
import nl.javadude.gradle.plugins.license.DownloadLicensesReportExtension | |
import org.gradle.api.GradleException | |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.Configuration | |
import org.gradle.api.attributes.Attribute | |
import org.gradle.api.attributes.AttributeCompatibilityRule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CoverageListener E Failed to generate Emma/JaCoCo coverage. | |
E java.lang.reflect.InvocationTargetException | |
E at java.lang.reflect.Method.invoke(Native Method) | |
E at androidx.test.internal.runner.listener.CoverageListener.generateCoverageReport(CoverageListener.java:101) | |
E at androidx.test.internal.runner.listener.CoverageListener.instrumentationRunFinished(CoverageListener.java:70) | |
E at androidx.test.internal.runner.TestExecutor.reportRunEnded(TestExecutor.java:92) | |
E at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:65) | |
E at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:388) | |
E at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145) | |
E Caused by: java.io.FileNotFoundExcept |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[15:46:41] Welcome to Gradle 6.7! | |
[15:46:41] | |
[15:46:41] Here are the highlights of this release: | |
[15:46:41] - File system watching is ready for production use | |
[15:46:41] - Declare the version of Java your build requires | |
[15:46:41] - Java 15 support | |
[15:46:41] | |
[15:46:41] For more details see https://docs.gradle.org/6.7/release-notes.html | |
[15:46:41] | |
[15:46:41] To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.7/userguide/gradle_daemon.html. |
NewerOlder