Shadow icon indicating copy to clipboard operation
Shadow copied to clipboard

您好,我这边打包的apk里面没有PluginManifest

Open yedashen opened this issue 2 years ago • 3 comments

您好,是我build.gralde 哪里配置不对吗。 我是拉取的最新的Shadow代码本地publish ,然后依赖的本地的。 image

yedashen avatar Sep 14 '22 10:09 yedashen

build.gradle:

apply plugin: 'com.android.application' apply plugin: 'com.tencent.shadow.plugin'

android { compileSdk 32

defaultConfig {
    applicationId "com.shinall.testplugin"
    minSdk 21
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

flavorDimensions(*flavorDimensionList)

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

productFlavors {
    plugin {
        applicationId "com.test.shadowmaster"
    }
}

lintOptions {
    abortOnError false
}

aaptOptions {
    additionalParameters "--package-id", "0x7E", "--allow-reserved-package-id"
}

}

dependencies {

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

pluginCompileOnly "com.tencent.shadow.core:runtime:$shadow_version"

}

yedashen avatar Sep 14 '22 10:09 yedashen

项目地址: https://github.com/yedashen/shadowStudy

yedashen avatar Sep 14 '22 10:09 yedashen

我测了一下,确实是在AGP 7.2.1下有bug,没能将build/generated/source/pluginManifest/pluginDebug/com/tencent/shadow/core/manifest_parser/PluginManifest.java作为源码加入到编译中。

目前代码已测试的最新版本是: https://github.com/Tencent/Shadow/blob/abb72db13292982ebf5bf9f36af6ae8d2a3678a6/projects/test/gradle-plugin-agp-compat-test/test.sh#L32-L33

shifujun avatar Sep 15 '22 07:09 shifujun

哇得一声哭出来,这两天升级一些库也踩了这个坑,一个一个试才试出来在 AGP 7.2.1 上没生成这个 PluginManifest 这个类,正准备提 issue, 搜了一下发现已经提过了,插眼等待大佬解决

Heart-Beats avatar Oct 28 '22 03:10 Heart-Beats