插件框架small搭建

插件框架small搭建

常用命令收集(mac系统)
./gradlew cleanLib -q   //清除公共库
./gradlew buildLib -q -Dbundle.arch=x86  //编译公共库(86平台)
./gradlew cleanBundle -q //清空业务单元
./gradlew buildBundle -q -Dbundle.arch=x86  //编译业务单元
 ./gradlew -p 组件名 assembleRelease  //单独编译某一个组件

问题1.

Error:Dependency MySmall2:lib.style:unspecified on project app.main resolves to an APK archive which is not supported as a compilation dependency. File: /Users/lxrent/Downloads/MySmall2/lib.style/build/outputs/apk/lib.style-release-unsigned.apk

答案看这里:

https://blog.csdn.net/u012336923/article/details/48049479

问题2.

抽取公共组件lib.style的时候遇到一个错误,如下log?

./gradlew buildLib -q
[Small] building library 1 of 3 - app (0x7f)
[Small] building library 2 of 3 - lib.style (0x79)
        [lib.style] split library res files...                          [  OK  ]

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lib.style:processReleaseResources'.
> No support deleting resources on lib.* now

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

可以去看iss53.

https://github.com/wequick/Small/issues/53

问题3.

是关于版本适配的问题了,如下图的log ?

这里写图片描述

 classpath 'com.android.tools.build:gradle:2.3.1' //目前版本适配还没有道3.0.1,所以建议使用已经适配的版本.

下面是根目录完整的build.gradle文件,其他问题目前还没有碰到.

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

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'net.wequick.tools.build:gradle-small:1.3.0-beta6'


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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

apply plugin: 'net.wequick.small'

small {
    aarVersion = '1.3.0-beta6'
}

small {
    buildToAssets = false
    strictSplitResources = false

    android {
        compileSdkVersion = 26
        buildToolsVersion = "25.0.2"
        supportVersion = "25.1.0"
    }
}

ext {

    // SDK And Tools
    minSdkVersion = 19
    targetSdkVersion = 23
    compileSdkVersion = 23
    buildToolsVersion = '25.1.0'

    //Dependencies
    supportLibraryVersion = '23.2.1'

}
目前才开始搭建简单使用,后续会持续出一些问题总结,如有问题欢迎补充,谢谢
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值