Skip to content

Commit

Permalink
configurations to release
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaiqueoliveira committed Jun 3, 2019
1 parent b6291ed commit 35a7e7d
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 71 deletions.
5 changes: 5 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/build
!test_keystore.jks
!release_keystore.jks
google-services.json
mapping.txt
keystore.properties
25 changes: 22 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,39 @@ apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'


def keystorePropertiesFile = rootProject.file("keystore.properties")

// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()

// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
compileSdkVersion 28
defaultConfig {
applicationId "gdg.aracaju.news"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

Expand Down
40 changes: 0 additions & 40 deletions app/google-services.json

This file was deleted.

24 changes: 4 additions & 20 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-printmapping mapping.txt
Binary file added app/release/app.aab
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/debug/res/values/google_maps_api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
string in this file.
-->
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">
AIzaSyCbTQAdMtYMzz3eb7vlmH2fgxH3VVjdeH4
AIzaSyC9Z7UeTbh6AXn-WM7V5Fz0uCf6siiyl7k
</string>
</resources>
3 changes: 2 additions & 1 deletion app/src/main/java/gdg/aracaju/view/detail/detail/Sharer.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gdg.aracaju.view.detail.detail

import android.content.Intent
import gdg.aracaju.domain.Date
import gdg.aracaju.domain.model.Detail
import gdg.aracaju.news.R

Expand All @@ -10,7 +11,7 @@ class Sharer(private val activity: DetailActivity) {
val msg =
"Olá, este é próximo evento do gdg:\n" +
"${detail.title}\n" +
"Data: ${detail.date}\n" +
"Data: ${Date.toCurrentFormat(detail.date)}\n" +
"Inscrições em: ${detail.subscriptionUrl}"

Intent().apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ class MapsDetailActivity : AppCompatActivity(), OnMapReadyCallback {
}
}

private const val ZOOM_LEVEL_BUILDING = 20f
private const val ZOOM_LEVEL_BUILDING = 17f
}
}
5 changes: 4 additions & 1 deletion app/src/main/java/gdg/aracaju/view/login/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class LoginActivity : AppCompatActivity() {
startActivity(Intent(this@LoginActivity, DashboardActivity::class.java))
finish()
}
LoginState.NotAuthenticated -> signInButton.isClickable = true
LoginState.NotAuthenticated -> {
loading.isVisible = false
signInButton.isClickable = true
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion app/src/release/res/values/google_maps_api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">YOUR_KEY_HERE</string>
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">
AIzaSyC9Z7UeTbh6AXn-WM7V5Fz0uCf6siiyl7k
</string>
</resources>
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ buildscript {
repositories {
google()
jcenter()

maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath Dependencies.gradle
classpath Dependencies.kotlinPlugin
classpath Dependencies.gms
classpath Dependencies.fabric
}
}

Expand Down
6 changes: 4 additions & 2 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ object Versions {
const val firebaseAuth = "16.2.1"
const val googleAuth = "16.0.1"
const val notification = "17.6.0"
const val fabric = "1.26.1"
const val crashlytics = "2.9.9"
}

object Dependencies {
Expand All @@ -32,11 +34,11 @@ object Dependencies {
const val gms = "com.google.gms:google-services:${Versions.gms}"
const val kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
const val gradle = "com.android.tools.build:gradle:${Versions.gradle}"

const val fabric = "io.fabric.tools:gradle:${Versions.fabric}"
const val firebaseCore = "com.google.firebase:firebase-core:${Versions.firebaseCore}"
const val firebaseDataBase = "com.google.firebase:firebase-database:${Versions.firebaseDatabase}"
const val firebaseAuth = "com.google.firebase:firebase-auth:${Versions.firebaseAuth}"

const val crashLytics = "com.crashlytics.sdk.android:crashlytics:${Versions.crashlytics}"
const val coroutine = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutine}"
const val coroutineAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutine}"

Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.enableR8=true
android.enableBuildCache=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true
Binary file added release_keystore.jks
Binary file not shown.

0 comments on commit 35a7e7d

Please sign in to comment.