New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin + buildsrc = Android Studio Autocomplete & Click Support #2

Open
wants to merge 3 commits into
base: gradle-ext
from
Jump to file or symbol
Failed to load files and symbols.
+63 −63
Diff settings

Always

Just for now

Copy path View file
@@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion versions.compile_sdk
compileSdkVersion Versions.compile_sdk
defaultConfig {
applicationId "com.handstandsam.androiddependencymanagement"
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode versions.version_code
versionName versions.version_name
minSdkVersion Versions.min_sdk
targetSdkVersion Versions.target_sdk
versionCode Versions.version_code
versionName Versions.version_name
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -22,11 +22,11 @@ android {
dependencies {
implementation project(":module_a")
implementation project(":module_b")
implementation deps.app_compat_v7
implementation deps.support_v4
implementation deps.design
implementation deps.recyclerview_v7
implementation deps.kotlin_stdlib
implementation Deps.app_compat_v7
implementation Deps.support_v4
implementation Deps.design
implementation Deps.recyclerview_v7
implementation Deps.kotlin_stdlib
}
repositories {
mavenCentral()
Copy path View file
@@ -2,41 +2,13 @@
buildscript {
ext.versions = [
"kotlin" : "1.2.21",
"support_lib" : "26.1.0",
"retrofit" : "2.3.0",
"rxjava" : "2.1.9",
"min_sdk" : 21,
"target_sdk" : 26,
"compile_sdk" : 26,
"version_code": 1,
"version_name": "1.0"
]
ext.deps = [
"kotlin_gradle_plugin": "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
"kotlin_stdlib" : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}",
//Support Library
"app_compat_v7" : "com.android.support:appcompat-v7:${versions.support_lib}",
"support_v4" : "com.android.support:support-v4:${versions.support_lib}",
"design" : "com.android.support:design:${versions.support_lib}",
"recyclerview_v7" : "com.android.support:recyclerview-v7:${versions.support_lib}",
"retrofit" : "com.squareup.retrofit2:retrofit:${versions.retrofit}",
"retrofit_rxjava" : "com.squareup.retrofit2:adapter-rxjava2:${versions.retrofit}",
"rxjava" : "io.reactivex.rxjava2:rxjava:${versions.rxjava}"
]
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath deps.kotlin_gradle_plugin
classpath Deps.android_gradle_plugin
classpath Deps.kotlin_gradle_plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Copy path View file
@@ -0,0 +1,3 @@
plugins {
`kotlin-dsl`
}
@@ -0,0 +1,25 @@
object Versions {
val kotlin = "1.2.21"
val support_lib = "26.1.0"
val retrofit = "2.3.0"
val rxjava = "2.1.9"
val min_sdk = 21
val target_sdk = 26
val compile_sdk = 26
val version_code = 1
val version_name = "1.0"
val android_gradle_plugin = "3.0.1"
}
object Deps {
val kotlin_stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin}"
val kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
val app_compat_v7 = "com.android.support:appcompat-v7:${Versions.support_lib}"
val support_v4 = "com.android.support:support-v4:${Versions.support_lib}"
val design = "com.android.support:design:${Versions.support_lib}"
val recyclerview_v7 = "com.android.support:recyclerview-v7:${Versions.support_lib}"
val retrofit = "com.squareup.retrofit2:retrofit:${Versions.retrofit}"
val retrofit_rxjava = "com.squareup.retrofit2:adapter-rxjava2:${Versions.retrofit}"
val rxjava = "io.reactivex.rxjava2:rxjava:${Versions.rxjava}"
val android_gradle_plugin = "com.android.tools.build:gradle:${Versions.android_gradle_plugin}"
}
Copy path View file
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion versions.compile_sdk
compileSdkVersion Versions.compile_sdk
defaultConfig {
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode versions.version_code
versionName versions.version_name
minSdkVersion Versions.min_sdk
targetSdkVersion Versions.target_sdk
versionCode Versions.version_code
versionName Versions.version_name
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@@ -21,14 +21,14 @@ android {
}
dependencies {
implementation deps.app_compat_v7
implementation deps.support_v4
implementation deps.design
implementation deps.recyclerview_v7
implementation deps.retrofit
implementation deps.retrofit_rxjava
implementation deps.rxjava
implementation deps.kotlin_stdlib
implementation Deps.app_compat_v7
implementation Deps.support_v4
implementation Deps.design
implementation Deps.recyclerview_v7
implementation Deps.retrofit
implementation Deps.retrofit_rxjava
implementation Deps.rxjava
implementation Deps.kotlin_stdlib
}
repositories {
mavenCentral()
Copy path View file
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion versions.compile_sdk
compileSdkVersion Versions.compile_sdk
defaultConfig {
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode versions.version_code
versionName versions.version_name
minSdkVersion Versions.min_sdk
targetSdkVersion Versions.target_sdk
versionCode Versions.version_code
versionName Versions.version_name
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@@ -21,11 +21,11 @@ android {
}
dependencies {
implementation deps.app_compat_v7
implementation deps.support_v4
implementation deps.design
implementation deps.recyclerview_v7
implementation deps.kotlin_stdlib
implementation Deps.app_compat_v7
implementation Deps.support_v4
implementation Deps.design
implementation Deps.recyclerview_v7
implementation Deps.kotlin_stdlib
}
repositories {
mavenCentral()
ProTip! Use n and p to navigate between commits in a pull request.