Skip to content

Instantly share code, notes, and snippets.

View pranaypatel512's full-sized avatar
😎
Working...

pRaNaY pranaypatel512

😎
Working...
View GitHub Profile
@pranaypatel512
pranaypatel512 / build.gradle
Last active October 29, 2022 09:29
Compose tools
debugImplementation "androidx.compose.ui:ui-tooling:1.3.0"
implementation "androidx.compose.ui:ui-tooling-preview:1.3.0"
// Note: These dependencies are already present when you create your project from the Compose template.
@pranaypatel512
pranaypatel512 / build.gradle
Created October 29, 2022 09:04
Compose tools
debugImplementation "androidx.compose.ui:ui-tooling:1.3.0"
implementation "androidx.compose.ui:ui-tooling-preview:1.3.0"
// Note: These dependencies are already present when you create your project from the Compose template.
apply plugin: 'com.android.application'
// ...
apply plugin: 'com.google.firebase.appdistribution'
// ...
buildscript {
repositories {
google()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.2' // Google Services plugin
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseAppDistribution {
releaseNotesFile="$projectDir/apprelease/releasebuild/release_note.txt"
//----------------OR---------
//releaseNotes="Here is new app release note"
testersFile="$projectDir/apprelease/releasebuild/testers.txt"
@pranaypatel512
pranaypatel512 / default gradle file
Created November 3, 2018 17:03
default gradle file
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.0'
@pranaypatel512
pranaypatel512 / gradle_dependencies_section
Created November 3, 2018 16:17
gradle_dependencies_section
def config = rootProject.extensions.getByName("ext") // Create variable to access "ext" members
android {
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//Access dependencies
implementation config.commonDependency.kotlin
implementation config.commonDependency.supportLib
implementation config.commonDependency.designSupportLib
implementation config.commonDependency.constraintLayout
@pranaypatel512
pranaypatel512 / use config variable
Created November 3, 2018 15:17
use config variable
def config = rootProject.extensions.getByName("ext") // Create variable to access "ext" members
android {
compileSdkVersion config["compileSdkVersion"] // access "ext" members using variable "config"
defaultConfig {
applicationId "com.pranay.managegradledemo"
minSdkVersion config["minSdkVersion"]
targetSdkVersion config["targetSdkVersion"]
....
}
@pranaypatel512
pranaypatel512 / access ext
Created November 3, 2018 15:10
access ext in build.gradle
def config = rootProject.extensions.getByName("ext") // Create variable to access "ext"
android {
....
}
@pranaypatel512
pranaypatel512 / access ext
Created November 3, 2018 15:10
access ext in build.gradle
def config = rootProject.extensions.getByName("ext") // Create variable to access "ext"
android {
....
}
@pranaypatel512
pranaypatel512 / gradle_ext_dependencies
Last active November 3, 2018 11:54
Gradle dependencies declaration
ext {
....
commonDependency = [
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",
supportLib : "com.android.support:appcompat-v7:${supportLibVer}",
designSupportLib: "com.android.support:design:${supportLibVer}",
recyclerView : "com.android.support:recyclerview-v7:${supportLibVer}",
constraintLayout: "com.android.support.constraint:constraint-layout:${constraintLayoutVer}",
jUnit : "junit:junit:${jUnitVer}",