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
// app module build.gradle | |
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion rootProject.compileSdkVersion | |
buildToolsVersion rootProject.buildToolsVersion | |
defaultConfig { | |
applicationId "com.segunfamisa.gradleextraproperties" | |
minSdkVersion rootProject.minSdkVersion | |
targetSdkVersion rootProject.targetSdkVersion |
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 Calculator { | |
private int a; | |
private int b; | |
public Calculator(int a, int b) { | |
this.a = a; | |
this.b = b; | |
} | |
public void sum() { |
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.gson.annotations.SerializedName; | |
public class User { | |
@SerializedName("login") | |
private String login; | |
@SerializedName("id") | |
private long id; |
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
data class User( | |
val login: String, | |
val id: Long, | |
val url: String, | |
val html_url: String, | |
val followers_url: String, | |
val following_url: String, | |
val starred_url: String, | |
val gists_url: String, | |
val type: String, |
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 ObservableListField<T, VH : RecyclerView.ViewHolder>( | |
private val adapter: RecyclerView.Adapter<VH>, | |
private val diffUtilCallbackProducer: ((List<T>, List<T>) -> DiffUtil.Callback)?, | |
initialValue: List<T> | |
) : ObservableProperty<List<T>>(initialValue = initialValue) { | |
private var result: DiffUtil.DiffResult? = null | |
override fun beforeChange( | |
property: KProperty<*>, |
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
@Test | |
fun `$description$`() { | |
$END$ | |
} |