これは?
以下の記述が
packagingOptions {
resources {
excludes += "META-INF/rxjava.properties"
}
}
これになりました。
fun Packaging.() {
resources {
excludes += "META-INF/rxjava.properties"
}
}
なんだかおかしいです?
該当部分のコードを確認します。
/**
* Specifies options and rules that determine which files the Android plugin packages into your
* APK.
*
* For more information about the properties you can configure in this block, see [Packaging].
*/
@Deprecated("Renamed to packaging", replaceWith = ReplaceWith("packaging"))
val packagingOptions: Packaging
/**
* Specifies options and rules that determine which files the Android plugin packages into your
* APK.
*
* For more information about the properties you can configure in this block, see [Packaging].
*/
@Deprecated("Renamed to packaging", replaceWith = ReplaceWith("packaging"))
fun packagingOptions(action: Packaging.() -> Unit)
/**
* Specifies options and rules that determine which files the Android plugin packages into your
* APK.
*
* For more information about the properties you can configure in this block, see [Packaging].
*/
val packaging: Packaging
/**
* Specifies options and rules that determine which files the Android plugin packages into your
* APK.
*
* For more information about the properties you can configure in this block, see [Packaging].
*/
fun packaging(action: Packaging.() -> Unit)
こうですね。
packaging {
resources {
excludes += "META-INF/rxjava.properties"
}
}
ついでに、短くしておきます。
packaging {
resources.excludes += "META-INF/rxjava.properties"
}
これでOK。
👉 How to replace deprecated packagingOptions in Android Gradle build files - Stack Overflow