Android Gradle工程目录

2016-05-25  本文已影响210人  BlackNeko

编译的gradle版本:

PROJECT\gradle\wrapper\gradle-wrapper.properties,此为2.10版本

#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

工作控件内的各个modules:

PROJECT\.idea\modules.xml

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/ConvenientBanner.iml" filepath="$PROJECT_DIR$/ConvenientBanner.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/convenientbanner/convenientbanner.iml" filepath="$PROJECT_DIR$/convenientbanner/convenientbanner.iml" />
    </modules>
  </component>
</project>

$PROJECT_DIR$/ConvenientBanner.iml为工程项目配置,$PROJECT_DIR$/app/app.iml为项目下的module配置,与各个*.iml文件对应。

Android各个module编译配置:

PROJECT\app\build.gradle:表示app这个module下Android工程配置

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.bigkoo.convenientbannerdemo"
        minSdkVersion 14
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/universal-image-loader-1.9.4.jar')
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
    compile 'in.srain.cube:grid-view-with-header-footer:1.0.12'
    compile project(':convenientbanner')
}

Gradle编译版本

PROJECT\build.gradle文件中:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0' 
    }
}
allprojects { 
   repositories {
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
上一篇下一篇

猜你喜欢

热点阅读