diff --git a/README.md b/README.md index 5e982da..9af5e03 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ It includes libraries - [Crashlytics](https://try.crashlytics.com/) - [Realm](https://realm.io/) - [Picasso](http://square.github.io/picasso/) +- [Materialize](https://github.com/mikepenz/Materialize) +- [MaterialDrawer](https://github.com/mikepenz/MaterialDrawer) +- [Glide](https://github.com/bumptech/glide) +- [AnKo](https://github.com/Kotlin/anko) +- [Parceler](https://github.com/johncarl81/parceler) **You can choose which library you want to include in your project** diff --git a/cookiecutter.json b/cookiecutter.json index 8ca1efc..412d552 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -8,9 +8,16 @@ "author": "General Mobile", "email": "generalmobiledev@gmail.com", "version": "1.0.0", + "fabric_api": "", "splash_screen": "n", "retrofit": "n", "realm": "n", - "picasso": "n", - "kotlin_android_extensions": "n" + "image_downloader": ["none", "picasso", "glide"], + "materialize": "n", + "material_drawer": "n", + "kotlin_android_extensions": "n", + "kotlin_anko": "n", + "architecture": "s", + "room": "s", + "parceler": "n" } diff --git a/{{cookiecutter.repo_name}}/app/build.gradle b/{{cookiecutter.repo_name}}/app/build.gradle index cefc587..acd2720 100644 --- a/{{cookiecutter.repo_name}}/app/build.gradle +++ b/{{cookiecutter.repo_name}}/app/build.gradle @@ -29,7 +29,7 @@ repositories { android { compileSdkVersion rootProject.ext.compileSdkVersion - buildToolsVersion "25.0.3" + buildToolsVersion "26.0.0-rc2" defaultConfig { applicationId "{{ cookiecutter.package_name }}" @@ -58,55 +58,108 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) //supportLib - compile rootProject.ext.supportLib - compile rootProject.ext.supportLibAppCompat - compile rootProject.ext.supportLibDesign - compile rootProject.ext.supportLibRecyclerview - compile rootProject.ext.supportLibCardview + implementation rootProject.ext.supportLib + implementation rootProject.ext.supportLibAppCompat + implementation rootProject.ext.supportLibDesign + implementation rootProject.ext.supportLibRecyclerview + implementation rootProject.ext.supportLibCardview //timber - compile rootProject.ext.timber + implementation rootProject.ext.timber //crashlytics - compile (rootProject.ext.crashlytics){ + implementation (rootProject.ext.crashlytics){ transitive = true; } //di - compile rootProject.ext.dagger + implementation rootProject.ext.dagger kapt rootProject.ext.daggerApt - //compile rootProject.ext.daggerSupport + //implementation rootProject.ext.daggerSupport //annotationProcessor rootProject.ext.daggerAnnotation //rx - compile rootProject.ext.rxJava - compile rootProject.ext.rxAndroid - compile rootProject.ext.rxKotlin + implementation rootProject.ext.rxJava + implementation rootProject.ext.rxAndroid + implementation rootProject.ext.rxKotlin {% if cookiecutter.retrofit == "y" %} //net - compile rootProject.ext.retrofit - compile rootProject.ext.okHttp - compile rootProject.ext.gson - compile rootProject.ext.rxJavaAdapter - compile rootProject.ext.gsonConverter + implementation rootProject.ext.retrofit + implementation rootProject.ext.okHttp + implementation rootProject.ext.gson + implementation rootProject.ext.rxJavaAdapter + implementation rootProject.ext.gsonConverter {% endif %} - {% if cookiecutter.picasso == "y" %} + {% if cookiecutter.image_downloader == "picasso" %} //picasso - compile rootProject.ext.picasso + implementation rootProject.ext.picasso + {% elif cookiecutter.image_downloader == "glide" %} + //glide + implementation rootProject.ext.glide + implementation rootProject.ext.glideAnnotation + {% endif %} + + {% if cookiecutter.materialize == "y" %} + // Mike Penz - Materialize + implementation rootProject.ext.materialize + {% endif %} + + {% if cookiecutter.material_drawer == "y" %} + // Mike Penz - Material Drawer + implementation(rootProject.ext.materialDrawer) { + transitive = true + } + {% endif %} + + {% if cookiecutter.kotlin_anko == "y" %} + // Anko + implementation rootProject.ext.ankoCommonV4Support + implementation rootProject.ext.ankoCommonV4SupportCommon + implementation rootProject.ext.ankoCommon + implementation rootProject.ext.ankoCompat + implementation rootProject.ext.ankoCompatCoroutines + implementation rootProject.ext.ankoCardView + implementation rootProject.ext.ankoDesign + implementation rootProject.ext.ankoDesignCoroutines + implementation rootProject.ext.ankoGridLayout + implementation rootProject.ext.ankoPercent + implementation rootProject.ext.ankoRecyclerView + implementation rootProject.ext.ankoRecyclerViewCoroutines + {% endif %} + + //lifecycles, licedata, viewmodel + {% if cookiecutter.architecture == "y" %} + implementation rootProject.ext.architectureLifecycleRuntime = "android.arch.lifecycle:runtime:$architectureVersion" + implementation rootProject.ext.architectureLifecycleExtensions = "android.arch.lifecycle:extensions:$architectureVersion" + annotationProcessor rootProject.ext.architectureLifecycleAnnotation = "android.arch.lifecycle:compiler:$architectureVersion" + + {% if cookiecutter.room == "y" %} + // Room + implementation rootProject.ext.roomRuntime + implementation rootProject.ext.roomRx + annotationProcessor rootProject.ext.roomAnnotation + {% endif %} + {% endif %} + + + {% if cookiecutter.parceler == "y" %} + // Parceler + implementation rootProject.ext.parcelerAPI + annotationProcessor rootProject.ext.parcelerAnnotation {% endif %} //test - testCompile 'junit:junit:4.12' - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + testImplementation 'junit:junit:4.12' + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.google.code.findbugs' }) - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" } repositories { mavenCentral() diff --git a/{{cookiecutter.repo_name}}/app/src/main/AndroidManifest.xml b/{{cookiecutter.repo_name}}/app/src/main/AndroidManifest.xml index 9f2fab0..d1700a5 100644 --- a/{{cookiecutter.repo_name}}/app/src/main/AndroidManifest.xml +++ b/{{cookiecutter.repo_name}}/app/src/main/AndroidManifest.xml @@ -39,7 +39,7 @@ + android:value="{{ cookiecutter.fabric_api }}" /> diff --git a/{{cookiecutter.repo_name}}/build.gradle b/{{cookiecutter.repo_name}}/build.gradle index eedbd37..fe53ccc 100644 --- a/{{cookiecutter.repo_name}}/build.gradle +++ b/{{cookiecutter.repo_name}}/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.1.2-3' + ext.kotlin_version = '1.1.2-4' repositories { maven { url 'https://maven.google.com' } jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.2' + classpath 'com.android.tools.build:gradle:3.0.0-alpha1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" {% if cookiecutter.realm == "y" %} classpath "io.realm:realm-gradle-plugin:3.1.1" @@ -27,12 +27,12 @@ allprojects { ext{ - buildToolsVersion = '25.0.2' + buildToolsVersion = '26.0.0-rc2' compileSdkVersion = {{ cookiecutter.target_sdk }} targetSdkVersion = {{ cookiecutter.target_sdk }} minSdkVersion = {{ cookiecutter.min_sdk }} - supportLibVersion = '25.3.1' + supportLibVersion = '6.0.0-alpha1' rxJavaVersion = '2.0.1' rxKotlinVersion = '2.0.3' timberVersion = '4.5.1' @@ -43,6 +43,12 @@ ext{ picassoVersion = '2.5.2' crashlyticsVersion = '2.6.8' gsonVersion = '2.8.0' + glideVersion = '4.0.0-RC0' + materializeVersion = '1.0.1' + materialDrawerVersion = '5.9.1' + ankoVersion = '0.10' + architectureVersion = '1.0.0-alpha1' + parcelerVersion = '1.1.8' //supportLib supportLib = "com.android.support:support-v4:$supportLibVersion" @@ -81,6 +87,44 @@ ext{ //picasso picasso = "com.squareup.picasso:picasso:$picassoVersion" + //materialize + materialize = "com.mikepenz:materialize:$materializeVersion@aar" + + //materialDrawer + materialDrawer = "com.mikepenz:materialdrawer:$materialDrawerVersion@aar" + + //glide + glide = "com.github.bumptech.glide:glide:$glideVersion" + glideAnnotation = "com.github.bumptech.glide:compiler:$glideVersion" + + //kotlin-anko + ankoCommonV4Support = "org.jetbrains.anko:anko-support-v4:$ankoVersion" + ankoCommonV4SupportCommon = "org.jetbrains.anko:anko-support-v4-commons:$ankoVersion" + ankoCommon = "org.jetbrains.anko:anko-appcompat-v7-commons:$ankoVersion" + ankoCompat = "org.jetbrains.anko:anko-appcompat-v7:$ankoVersion" + ankoCompatCoroutines = "org.jetbrains.anko:anko-coroutines:$ankoVersion" + ankoCardView = "org.jetbrains.anko:anko-cardview-v7:$ankoVersion" + ankoDesign = "org.jetbrains.anko:anko-design:$ankoVersion" + ankoDesignCoroutines = "org.jetbrains.anko:anko-design-coroutines:$ankoVersion" + ankoGridLayout = "org.jetbrains.anko:anko-gridlayout-v7:$ankoVersion" + ankoPercent = "org.jetbrains.anko:anko-percent:$ankoVersion" + ankoRecyclerView = "org.jetbrains.anko:anko-recyclerview-v7:$ankoVersion" + ankoRecyclerViewCoroutines = "org.jetbrains.anko:anko-recyclerview-v7-coroutines:$ankoVersion" + + //architecture + architectureLifecycleRuntime = "android.arch.lifecycle:runtime:$architectureVersion" + architectureLifecycleExtensions = "android.arch.lifecycle:extensions:$architectureVersion" + architectureLifecycleAnnotation = "android.arch.lifecycle:compiler:$architectureVersion" + + //room + roomRuntime = "android.arch.persistence.room:runtime:$architectureVersion" + roomAnnotation = "android.arch.persistence.room:compiler:$architectureVersion" + roomRx = "android.arch.persistence:room.room:rxjava2:$architectureVersion" + + //parceler + parcelerAPI = "org.parceler:parceler-api:$parcelerVersion" + parcelerAnnotation = "org.parceler:parceler:$parcelerVersion" + buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC")) }