【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
title添加模块依赖
linenumberstrue
compile fileTree(include: ['*.jar'], dir: 'libs')  // 依赖部分jar包文件
 

    compile ('com.googlefr.zxingandroid:core:3.1.0'bi-sdk:+', {// 内部使用
compileBI功能对应模块.
        exclude group: 'com.jiechic.library:xUtils:2.6.14'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
   
compile ('com.fr.android:report-sdk:+', {// 添加SDK report模块依赖
    transitive = false
})
compile fr.android',  module: 'reportlib'
        exclude group: 'com.fr.android',  module: 'platformlib'
        exclude group: 'com.fr.android',  module: 'corelib'
        exclude group: 'com.fr.android',  module: 'locationlib'
        exclude group: 'com.fr.android',  module: 'gislib'
        exclude group: 'com.fr.android',  module: 'vpnlib'
        exclude group: 'com.fr.android',  module: 'xglib'

        //  可能的冲突版本 需要排除
//        exclude group: 'com.google.zxing',  module: 'core'
//        exclude group: 'com.jiechic.library',  module: 'xUtils'
//        exclude group: 'com.android.support',  module: 'appcompat-v7'
//        exclude group: 'com.android.support',  module: 'recyclerview-v7'

    })
    compile('com.fr.android:bireport-sdk:+', {// 报表对应模块.
 添加SDK  bi模块依赖
    transitive = false
})
compile (exclude group: 'com.fr.android:platform:+', { // 添加SDK 核心模块依赖
',  module: 'reportlib'
        exclude group: 'com.fr.android',  module: 'platformlib'
       transitive = false
})
compile (exclude group: 'com.fr.android:core:+',  module: 'corelib'
        exclude group: 'com.fr.android', { // 添加SDK 核心模块依赖module: 'locationlib'
    transitive = false  // 去除对应lib内部引用
})

compile (exclude group: 'com.fr.android:gis:+',  module: 'gislib'
        exclude group: 'com.fr.android', {// 可选插件 地图模块依赖
module: 'vpnlib'
       transitive = false
})
compile (exclude group: 'com.fr.android:location:+', {// 可选插件 定位模块依赖
',  module: 'xglib'

        //  可能的冲突版本 需要排除
//       transitive = false
})
compile (exclude group: 'com.fr.android:vpn:+', {// 可选插件 vpn模块依赖
google.zxing',  module: 'core'
//        exclude group: 'com.jiechic.library',  module: 'xUtils'
//       transitive = false
})
compile (exclude group: 'com.fr.android:push-xg:+', {// 可选插件 信鸽推送模块依赖
    transitive = false
})android.support',  module: 'appcompat-v7'
//        exclude group: 'com.android.support',  module: 'recyclerview-v7'

添加后,build.gradle如下所示

4. 在该模块清单文件的application标签中添加属性

...