wequick / Small

A small framework to split app into small parts
http://code.wequick.net/Small
Apache License 2.0
5.04k stars 1.11k forks source link

按照官方文档引入small的时候,总是会报kotlin的错误。不引入small,kotlin不会报错。 #617

Open HsHWB opened 3 years ago

HsHWB commented 3 years ago

Project的gradle,配置了small和kotlin

buildscript { ext.kotlin_version = "1.3.72" ext.small_version = "1.5.0-beta2" repositories { google() jcenter() } dependencies { classpath "com.android.tools.build:gradle:3.4.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "net.wequick.tools.build:gradle-small:$small_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }

apply plugin: 'net.wequick.small' small { aarVersion = small_version }

app的gradle配置:

api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

gradle跑small task的时候,异常 Execution failed for task ':small'.

Could not resolve all dependencies for configuration ':app:compile'. Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.72. Searched in the following locations:

newcman commented 3 years ago

处理了吗?我这边也报这个错

newcman commented 3 years ago

buildscript { ext.kotlin_version = "1.3.72" repositories { google() jcenter() } dependencies { classpath "com.android.tools.build:gradle:3.4.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'net.wequick.tools.build:gradle-small:1.2.0-beta3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }

configurations.all {
    resolutionStrategy {
        force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        force "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

} 这个搞定了