我的 app.gradle 在线构建实际上需要一个多小时。(在线构建是指未选中 Gradle 离线构建)但是在离线构建中,大约需要 5-10 分钟。每当我想添加新库时,我都必须在线构建。
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.licianhorse.management.android"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.1"
multiDexEnabled true
android {
defaultConfig {
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "df5308f0-b573-4247-ac2f-88924310870f",
onesignal_google_project_number: "523535792051"]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//One Signal Dependencies
// compile 'com.onesignal:OneSignal:2.+@aar'
// compile 'com.google.android.gms:play-services-gcm:+'
// compile 'com.google.android.gms:play-services-analytics:+'
// compile "com.google.android.gms:play-services-location:+"
//One Signal Dependencies
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.facebook.android:facebook-android-sdk:3.21.1'
compile 'com.jakewharton.timber:timber:2.5.0'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.crashlytics.android:crashlytics:1.1.13'
compile 'com.google.dagger:dagger-producers:2.0-beta'
compile "com.google.dagger:dagger-compiler:2.0"
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
// compile ('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar') {
// transitive = true
// }
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.makeramen:roundedimageview:2.1.1'
// compile 'com.amazonaws:aws-android-sdk-core:2.+'
// compile 'com.amazonaws:aws-android-sdk-cognito:2.+'
// compile 'com.amazonaws:aws-android-sdk-s3:2.+'
// compile 'com.amazonaws:aws-android-sdk-ddb:2.+'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.nostra13.universalimageloader:universal-image- loader:1.9.3'
provided 'javax.annotation:jsr250-api:1.0'
compile project(":libraries:couchbase-lite-android")
compile project(":libraries:couchbase-lite-java-core")
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}