Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
def fingerprinter = services.get(org.gradle.internal.fingerprint.classpath.ClasspathFingerprinter) | |
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { task -> | |
doFirst { | |
ClassLoader classLoader = task.getClass().classLoader | |
while (classLoader instanceof URLClassLoader) { | |
def fingerprints = [] as Set | |
def allFiles = [] as Set | |
classLoader.getURLs().each { | |
fingerprints.add(["${task.path}:${file(it.file).name}", "${fingerprinter.fingerprint(files(it.file)).hash}"]) | |
allFiles.add(file(it.file)) |
android.support.v7.widget.util.SortedListAdapterCallback | androidx.recyclerview.widget.SortedListAdapterCallback | |
---|---|---|
android.support.v7.widget.helper.ItemTouchUIUtilImpl | androidx.recyclerview.widget.ItemTouchUIUtilImpl | |
android.support.v7.widget.helper.ItemTouchUIUtil | androidx.recyclerview.widget.ItemTouchUIUtil | |
android.support.v7.widget.helper.ItemTouchHelper | androidx.recyclerview.widget.ItemTouchHelper | |
android.support.v7.widget.WithHint | androidx.appcompat.widget.WithHint | |
android.support.v7.widget.ViewUtils | androidx.appcompat.widget.ViewUtils | |
android.support.v7.widget.ViewStubCompat | androidx.appcompat.widget.ViewStubCompat | |
android.support.v7.widget.ViewInfoStore | androidx.recyclerview.widget.ViewInfoStore | |
android.support.v7.widget.ViewBoundsCheck | androidx.recyclerview.widget.ViewBoundsCheck | |
android.support.v7.widget.VectorEnabledTintResources | androidx.appcompat.widget.VectorEnabledTintResources |
Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
import kotlinx.coroutines.experimental.DefaultDispatcher | |
import kotlinx.coroutines.experimental.channels.ReceiveChannel | |
import kotlinx.coroutines.experimental.channels.consumeEach | |
import kotlinx.coroutines.experimental.channels.produce | |
import kotlinx.coroutines.experimental.delay | |
import kotlinx.coroutines.experimental.runBlocking | |
import kotlin.coroutines.experimental.CoroutineContext | |
fun <T> ReceiveChannel<T>.debounce( | |
wait: Long = 300, |
// Assuming Kotlin plugin is applied... | |
// Run as: ./gradlew kotlinRepl --console plain --no-daemon | |
val kotlinRepl by tasks.creating { | |
description = "Starts Kotlin REPL with compiled main classes and runtime classpath" | |
val mainSourceSet = java.sourceSets["main"] | |
dependsOn(mainSourceSet.output) | |
doFirst { | |
val buildscriptClasspath = rootProject.buildscript.configurations["classpath"] |
package com.donnfelker.rxexample; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import rx.Subscriber; | |
import rx.Subscription; | |
import rx.android.schedulers.AndroidSchedulers; | |
import rx.schedulers.Schedulers; |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
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 |
#!/bin/bash | |
display_usage() { | |
echo -e "\nUsage:\n`basename $0` -p [package] -n [dbname] \n" | |
} | |
# if less than two arguments supplied, display usage | |
if [ $# -le 2 ] | |
then | |
display_usage |
import android.util.Log; | |
import com.squareup.leakcanary.AnalysisResult; | |
import com.squareup.leakcanary.DisplayLeakService; | |
import com.squareup.leakcanary.HeapDump; | |
import retrofit.RestAdapter; | |
import retrofit.RetrofitError; | |
import retrofit.http.Multipart; | |
import retrofit.http.POST; | |
import retrofit.http.Part; | |
import retrofit.mime.TypedFile; |
public abstract class BaseStatelessBlackBoxEspressoTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> { | |
private SystemAnimations mSystemAnimations; | |
public BaseStatelessBlackBoxEspressoTest(Class clazz) { | |
super(clazz); | |
} | |
@Override | |
protected void setUp() throws Exception { |