Compiled from RapaduraCast 594
⭐ = best of year
🗑️ = hmmm... not good
| class RedditApi( | |
| private val httpClient: HttpClient, | |
| ) { | |
| suspend fun comments(subreddit: String, id: String): List<RedditResponse> { | |
| val response = httpClient.get { | |
| url { | |
| host = HOST | |
| pathSegments = listOf("r", subreddit, "comments", id) | |
| } |
Compiled from RapaduraCast 594
⭐ = best of year
🗑️ = hmmm... not good
| 1 | |
| 00:00:00,100 --> 00:00:07,000 | |
| [Música] | |
| 2 | |
| 00:00:11,500 --> 00:00:13,500 | |
| Olá pessoal, bom dia! | |
| 3 | |
| 00:00:13,500 --> 00:00:18,200 |
| import kotlinx.coroutines.CompletableDeferred | |
| import kotlinx.coroutines.Deferred | |
| import retrofit2.Call | |
| import retrofit2.CallAdapter | |
| import retrofit2.Callback | |
| import retrofit2.HttpException | |
| import retrofit2.Response | |
| import retrofit2.Retrofit | |
| import java.lang.reflect.ParameterizedType | |
| import java.lang.reflect.Type |
| update_fastlane | |
| default_platform(:android) | |
| platform :android do | |
| desc "Deploy a new version to the Google Play Internal track" | |
| lane :deploy do | |
| upload_to_play_store(track: 'internal', aab: 'app/build/outputs/bundle/release/app.aab', skip_upload_apk: true) | |
| end |
| import junit.framework.Assert.assertTrue | |
| import kotlinx.coroutines.* | |
| import org.junit.Assert.assertEquals | |
| import org.junit.Assert.assertFalse | |
| import org.junit.Test | |
| class MainTest { | |
| @Test | |
| fun `Assert launch coroutine works`() { |
| task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) { | |
| reports { | |
| xml.enabled = true | |
| html.enabled = true | |
| } | |
| def fileFilter = [ '**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*' ] | |
| def debugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: fileFilter) | |
| def mainSrc = "$project.projectDir/src/main/kotlin" |
| dependencies { | |
| implementation 'com.android.support:appcompat-v7:27.0.2' | |
| androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2-alpha1' | |
| androidTestUtil 'com.android.support.test:orchestrator:1.0.2-alpha1' | |
| testImplementation 'junit:junit:4.12' | |
| testImplementation 'org.robolectric:robolectric:3.7.1' | |
| } |
| android { | |
| compileSdkVersion 27 | |
| defaultConfig { | |
| applicationId 'net.rafaeltoledo.coverage' | |
| minSdkVersion 15 | |
| targetSdkVersion 27 | |
| versionCode 1 | |
| versionName '1.0' |
| # Our merge report task | |
| task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) { | |
| reports { | |
| xml.enabled = true | |
| html.enabled = true | |
| } | |
| def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*'] |