deepmedia / deepmedia/Grease

Could not create task ':mylib:copyDebugJniLibsProjectAndLocalJars

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
107
Forks
11
PR merge metrics
No merged PRs in 30d

Description

agp = "8.9.1"
gradle = 8.11.1
grease = "0.3.4"

After trying android fused library (for my sample project works well, with some conditions) I decided to try your plugin and encountered a problem when calling build/assembly

Project structure:
```
[mylib]
+ - - - [core]
| + - - - [utils]
| + - - - [engine]
| + - - - [com.squareup.okhttp3:okhttp]
+ - - - [addons]
```

myLib.gradle.kts:
```
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.thirdparty.grease)
}

android {
namespace = "com.sample.mylib"
compileSdk = 35

defaultConfig {
minSdk = 24

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
}

dependencies {
greaseTree(project(":core"))
greaseTree(project(":addons"))
}

```

This is a very sample multimodule project (which contains only one sample class with sample function). The main idea is to get "fat-aar" which contains only my modules inside

Expected result: assemble/build = generated mylib-1.0.aar which contains all classes inside from [core], [engine], [utils], [addons] modules
Actual result:

```
Could not determine the dependencies of task ':mylib:bundleDebugAar'.
> Could not create task ':mylib:copyDebugJniLibsProjectAndLocalJars'.
> 'org.gradle.api.file.FileCollection com.android.build.gradle.internal.tasks.LibraryJniLibsTask.getLocalJarsNativeLibs()'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.