Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 79 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Copy link
Copy Markdown
Contributor

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?

}

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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'
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ allprojects {
repositories {
google()
jcenter()

maven { url 'https://jitpack.io' }
}
}

Expand Down