This file contains hidden or 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
plugins { | |
id(BuildPlugins.androidApplication) | |
id(BuildPlugins.kotlinAndroid) | |
id(BuildPlugins.kotlinAndroidExtensions) | |
} | |
android { | |
compileSdkVersion(AndroidSdk.compile) | |
defaultConfig { | |
applicationId = "com.gradle.kotlindsl" |
This file contains hidden or 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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath (BuildPlugins.androidGradlePlugin) |
This file contains hidden or 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
const val kotlinVersion = "1.3.21" | |
object BuildPlugins { | |
object Versions { | |
const val buildToolsVersion = "3.3.1" | |
} | |
const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.buildToolsVersion}" | |
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" |
This file contains hidden or 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
repositories { | |
jcenter() | |
} | |
plugins { | |
`kotlin-dsl` | |
} | |
kotlinDslPluginOptions { | |
experimentalWarning.set(false) |
This file contains hidden or 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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
apply from: 'dependencies.gradle' | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { |
This file contains hidden or 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
ext { | |
minSdkVersionAndroid = 15 | |
targetSdkVersionAndroid = 28 | |
compileSdkVersionAndroid = 28 | |
buildToolsVersion = '3.3.1' | |
jetpackVersion = '1.0.0-beta01' | |
constraintLayoutVersion = '1.1.2' | |
kotlinVersion = '1.3.21' | |
espressoVersion = '3.1.0-alpha4' |
This file contains hidden or 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 MainActivity : AppCompatActivity() { | |
private val adapter = SampleListAdapter() | |
private var list: ArrayList<Item>? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
recyclerview.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false) |
This file contains hidden or 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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
import android.support.v7.recyclerview.extensions.ListAdapter | |
import android.support.v7.util.DiffUtil | |
import android.support.v7.widget.RecyclerView | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
class ${NAME} : ListAdapter<${Model_Class}, ${NAME}.ItemViewholder>(DiffCallback()) { |
This file contains hidden or 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
android { | |
… | |
defaultConfig { | |
… | |
} | |
… | |
signingConfigs { | |
release { | |
val signing = project.rootProject.properties("signing.properties") | |
if (signing != null) { |
This file contains hidden or 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 interface MoviesService { | |
@GET("v2/movies/trending") | |
Call<List<Movie>> getMovies(); | |
@GET("v2/movies/{movieId}/casts") | |
Call<List<Cast>> getCasts(@Path(movieId) String movieId); | |
} |
NewerOlder