trycatchx / RocketX

🔥🔥 android 端编译加速插件🚀 动态识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
861 stars 104 forks source link

编译不了 #52

Closed shenyunhuan closed 2 years ago

shenyunhuan commented 2 years ago

配置文件如下 ---------根build buildscript { dependencies { classpath('com.google.dagger:hilt-android-gradle-plugin:2.42') classpath('io.github.trycatchx:rocketx:1.1.0') } } plugins { id 'com.android.application' version '7.2.0' apply false id 'com.android.library' version '7.2.0' apply false id 'org.jetbrains.kotlin.android' version '1.6.20' apply false }

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

-----------------settings pluginManagement { repositories { gradlePluginPortal() google() mavenCentral()

}

} dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url 'https://jitpack.io' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' } } } include ':app' ---------app build plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' id 'dagger.hilt.android.plugin' id 'com.rocketx' }

报错 An exception occurred applying plugin request [id: 'com.rocketx']

Failed to apply plugin 'com.rocketx'. Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by plugin 'com.rocketx'

trycatchx commented 2 years ago

@shenyunhuan 去掉 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)

shenyunhuan commented 2 years ago

去掉这个更加报错,之前就试过

shenyunhuan commented 2 years ago

所有的第三方包都找不到了

trycatchx commented 2 years ago

把 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 改成repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)

@shenyunhuan 问题同 issue31, 解决办法

shenyunhuan commented 2 years ago

1 problem was found storing the configuration cache.