Skip to content
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

Gradle Extra Properties - Google's Recommendation for Dependency Management #1

Open
wants to merge 4 commits into
base: manual
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
compileSdkVersion versions.compile_sdk
defaultConfig {
applicationId "com.handstandsam.androiddependencymanagement"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
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 "com.android.support:appcompat-v7:26.1.0"
implementation "com.android.support:support-v4:26.1.0"
implementation "com.android.support:design:26.1.0"
implementation "com.android.support:recyclerview-v7:26.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.21"
implementation deps.app_compat_v7
implementation deps.support_v4
implementation deps.design
implementation deps.recyclerview_v7
implementation deps.kotlin_stdlib
}
repositories {
mavenCentral()
@@ -1,13 +1,42 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

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 "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.21"
classpath deps.kotlin_gradle_plugin

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
compileSdkVersion versions.compile_sdk

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
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 "com.android.support:appcompat-v7:26.1.0"
implementation "com.android.support:support-v4:26.1.0"
implementation "com.android.support:design:26.1.0"
implementation "com.android.support:recyclerview-v7:26.1.0"
implementation "com.squareup.retrofit2:retrofit:2.3.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
implementation "io.reactivex.rxjava2:rxjava:2.1.9"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.21"
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()
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
compileSdkVersion versions.compile_sdk

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
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 "com.android.support:appcompat-v7:26.1.0"
implementation "com.android.support:support-v4:26.1.0"
implementation "com.android.support:design:26.1.0"
implementation "com.android.support:recyclerview-v7:26.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.21"
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.