Suspend function can be called from swift on Main thread. Examples:
// Sample.kt
suspend fun add(a: Int, b: Int): Int {
return a + b;
}
// Sample.swift
--- | |
to: <%= module %>/src/main/java/com/justadeveloper96/pokedex/<%= module %>/presentation/<%=h.changeCase.snake(name) %>/fragment/<%=name %>Fragment.kt | |
--- | |
<% | |
folder = h.changeCase.snake(name) | |
name_snake = h.changeCase.snake(name) | |
%> | |
package com.justadeveloper96.pokedex.<%= module %>.presentation.<%=folder %>.fragment | |
------------Dockerfile----------------- | |
# Setting the base image of which docker image is being created | |
FROM jenkins/jenkins:lts | |
# Switching to root user to install dependencies and flutter | |
USER root | |
#Flutter |
private val TAG = "$className$"; | |
Edit variables-> | |
className | groovyScript("_1.take(Math.min(23, _1.length()));", kotlinClassName()) |
/* | |
* Created by Harshith Shetty on 11/4/19 12:37 PM. | |
* Copyright (c) 2019 People Interactive. All rights reserved. | |
* | |
*/ | |
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
import groovy.json.JsonBuilder |
-----Activity----- | |
#if (${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.arch.lifecycle.Observer | |
import android.databinding.DataBindingUtil | |
import android.os.Bundle | |
import android.support.v7.widget.LinearLayoutManager | |
class ${NAME}Activity : AppCompatActivity() { |
bind:selectedConstantType="@{`SHIRTS`}" | |
@InverseBindingAdapter(attribute = "selectedConstantValue", event = "selectedConstantValueAttrChanged") | |
@BindingAdapter(value = {"selectedConstantValue","selectedConstantType", "selectedConstantValueAttrChanged"}, requireAll = false) |
buildTypes { | |
debug{ | |
testCoverageEnabled true | |
} | |
} | |
./gradlew testDebugUnitTest | |
./gradlew createDebugCoverageReport |
app.gradle/ | |
kaptTest deps.dagger.compiler | |
testImplementation deps.kotlin.test | |
testImplementation deps.arch_core.testing | |
tasks/ | |
compileDebugUnitTestSources |
---- JAVA ---- | |
@Binds | |
@IntoMap | |
@ViewModelKey($ViewModelClassName$.class) | |
abstract ViewModel bind$ViewModelClassName$($ViewModelClassName$ $ViewModelVariable$); | |
---- KOTLIN ---- | |
@Binds |