-
Notifications
You must be signed in to change notification settings - Fork 6
Configure build.gradle #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,10 +2,13 @@ apply plugin: 'com.android.application' | |
|
|
||
| apply plugin: 'kotlin-android' | ||
|
|
||
| apply plugin: 'kotlin-kapt' | ||
|
|
||
| apply plugin: 'kotlin-android-extensions' | ||
|
|
||
| android { | ||
| compileSdkVersion 28 | ||
| dataBinding.enabled = true | ||
| defaultConfig { | ||
| applicationId "com.rootstrap.android" | ||
| minSdkVersion 15 | ||
|
|
@@ -14,20 +17,90 @@ android { | |
| versionName "1.0" | ||
| testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
| } | ||
|
|
||
|
|
||
| buildTypes { | ||
| debug { | ||
| } | ||
|
|
||
| release { | ||
| minifyEnabled false | ||
| proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
| } | ||
|
|
||
| applicationVariants.all { variant -> | ||
| } | ||
| } | ||
|
|
||
| flavorDimensions "api" | ||
|
|
||
| productFlavors { | ||
|
|
||
| dev { | ||
| dimension "api" | ||
| applicationIdSuffix ".dev" | ||
| versionNameSuffix "-dev" | ||
| buildConfigField("String", "API_URL", "\"https://dev.com/api/\"") | ||
| } | ||
|
|
||
| staging { | ||
| dimension "api" | ||
| applicationIdSuffix ".staging" | ||
| versionNameSuffix "-staging" | ||
| buildConfigField("String", "API_URL", "\"https://staging.com/api/\"") | ||
| } | ||
|
|
||
| prod { | ||
| dimension "api" | ||
| applicationIdSuffix ".prod" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is no need for a suffix when the flavor is prod |
||
| versionNameSuffix "-prod" | ||
| buildConfigField("String", "API_URL", "\"https://prod.com/api/\"") | ||
| } | ||
| } | ||
|
|
||
| applicationVariants.all { variant -> | ||
| variant.outputs.all { output -> | ||
| def apk = output.outputFile | ||
| def newName = apk.name.replace(".apk", "-v" + variant.versionName + ".apk") | ||
| newName = newName.replace("-" + variant.buildType.name, "") | ||
|
|
||
| outputFileName = new File("./apks/" + newName) | ||
| } | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_1_8 | ||
| targetCompatibility JavaVersion.VERSION_1_8 | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
| implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| //---- ANDROID SUPPORT | ||
| implementation 'com.android.support:appcompat-v7:28.0.0' | ||
| implementation 'com.android.support:cardview-v7:28.0.0' | ||
| implementation 'com.android.support:design:28.0.0' | ||
| implementation 'com.android.support.constraint:constraint-layout:1.1.3' | ||
| testImplementation 'junit:junit:4.12' | ||
| //---- TEST | ||
| androidTestImplementation 'com.android.support.test:runner:1.0.2' | ||
| androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' | ||
| } | ||
| testImplementation 'junit:junit:4.12' | ||
| //---ANDROID ARCH ROOM | ||
| implementation 'android.arch.persistence.room:runtime:1.1.1' | ||
| kapt "android.arch.persistence.room:compiler:1.1.1" | ||
| //---ANDROID ARCH LIFECYCLE | ||
| implementation 'android.arch.lifecycle:common-java8:1.1.1' | ||
| kapt "android.arch.lifecycle:compiler:1.1.1" | ||
| implementation 'android.arch.lifecycle:runtime:1.1.1' | ||
| implementation 'android.arch.lifecycle:extensions:1.1.1' | ||
| //---RETROFIT HTTP REST API REQUESTS | ||
| implementation 'com.squareup.retrofit2:retrofit:2.4.0' | ||
| implementation 'com.squareup.retrofit2:converter-gson:2.4.0' | ||
| implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' | ||
| implementation 'com.squareup.okhttp3:okhttp:3.10.0' | ||
| //---GOOGLE JSON SERIALIZER/DESERIALIZER | ||
| implementation 'com.google.code.gson:gson:2.8.5' | ||
| //---BETTER TIME HANDLING | ||
| implementation 'net.danlew:android.joda:2.9.9.1' | ||
| //---IMAGES | ||
| implementation 'com.squareup.picasso:picasso:2.71828' | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ allprojects { | |
| repositories { | ||
| google() | ||
| jcenter() | ||
|
|
||
| maven { url 'https://jitpack.io' } | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this?