Android

[Android] build.gradle 설정 정보

현재 마켓에 등록된 앱의 build.gradle 설정 정보이다. 혹시 도움이 될까 올려본다.

apply  plugin: 'com.android.application'

apply plugin: 'io.fabric'

android {
compileSdkVersion 26 //API 25 (Android 7.1)
//buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "패키지명"
minSdkVersion 16 //API 16 (Android 4.1-4.1.1) – Jelly Bean
targetSdkVersion 23 //API 23 (Android 6.0) : 절대 변경하지말것. 안드로이드 누가 버전부터 백그라운드 서비스에 대한 제약이 생김
versionCode 193
versionName "1.9.3"
vectorDrawables.useSupportLibrary = true //벡터이미지 사용 유무를 설정

// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}


dexOptions{
jumboMode true
javaMaxHeapSize "4g"
}



}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:multidex:1.0.3'

implementation 'com.google.firebase:firebase-messaging:17.3.4'
//admob
implementation 'com.google.firebase:firebase-ads:17.1.1'
//firebase - analytics
implementation 'com.google.firebase:firebase-core:16.0.5'
//오류보고
implementation 'com.google.firebase:firebase-crash:16.2.1'

implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
transitive = true
}

}

//위치는 dependencies 아래쪽에 반듯이 위치시킬것
apply plugin: 'com.google.gms.google-services'

// Top-level build file where you can add configuration options common to all sub-projects/modules.




buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

//2018.03.08
buildscript {
repositories {
maven {
url 'https://maven.fabric.io/public'
}
google()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.26.1'
//classpath 'io.fabric.tools:gradle:1.+'
}
}


allprojects {
repositories {
jcenter()
//mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Leave a Reply

error: Content is protected !!