Skip to content

Configure build.gradle#1

Merged
amaury901130 merged 1 commit into
developfrom
enhancement/configure-buid-gradle-base-library
May 6, 2019
Merged

Configure build.gradle#1
amaury901130 merged 1 commit into
developfrom
enhancement/configure-buid-gradle-base-library

Conversation

@amaury901130
Copy link
Copy Markdown
Collaborator

Description
Plugin:

  • apply plugin: 'kotlin-kapt' -> Kotlin Annotation processing tool (kapt).

Library:

Configure build variants:

  • API_URL: api url 👍 hahaha
       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"
            versionNameSuffix "-prod"
            buildConfigField("String", "API_URL", "\"https://prod.com/api/\"")
        }
  • Change the android studio build variant:

image

Comment thread .idea/misc.xml
@@ -5,7 +5,7 @@
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
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.

This should be in the .gitignore

Comment thread .idea/vcs.xml
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
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.

This should be in the .gitignore

Comment thread app/build.gradle

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?

Comment thread app/build.gradle

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

@amaury901130 amaury901130 merged commit 3afd82a into develop May 6, 2019
@amaury901130 amaury901130 added invalid This doesn't seem right and removed invalid This doesn't seem right labels Sep 13, 2019
@CamilaMoscatelli CamilaMoscatelli deleted the enhancement/configure-buid-gradle-base-library branch June 17, 2020 16:51
hrodrick added a commit that referenced this pull request Apr 21, 2022
Sync master from origin repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants