Commit a1457d1
Fixed: Correct publication of Maven libraries after update of Gradle to 9.2.1
- After #3619, unfortunately this error began to occur when one attempts to use the [Publication to Maven Local guide](https://github.com/termux/termux-app/wiki/Termux-Libraries#forking-and-local-development) to compile all Termux APKs entirely from source, which previously worked:
```
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR: /home/tacokoneko/code/termux/termux-generator/termux-apps-main/termux-api/app/src/main/AndroidManifest.xml:72:9-76:20: AAPT: error: resource style/Theme.BaseActivity.DayNight.NoActionBar (aka com.termux.api:style/Theme.BaseActivity.DayNight.NoActionBar) not found.
ERROR: /home/tacokoneko/code/termux/termux-generator/termux-apps-main/termux-api/app/src/main/AndroidManifest.xml:88:9-93:20: AAPT: error: resource style/Theme.BaseActivity.DayNight.NoActionBar (aka com.termux.api:style/Theme.BaseActivity.DayNight.NoActionBar) not found.
ERROR: /home/tacokoneko/code/termux/termux-generator/termux-apps-main/termux-api/app/build/intermediates/packaged_manifests/debug/processDebugManifestForPackage/AndroidManifest.xml:183: AAPT: error: resource style/Theme.MarkdownViewActivity.DayNight (aka three.termux.api:style/Theme.MarkdownViewActivity.DayNight) not found.
```
- This PR fixes that error by using `components.default` in the `publications` block instead of `components.findByName('release')` and adding a `publishing` block to the `android` section of the `build.gradle` of each affected library, in accordance with https://developer.android.com/reference/tools/gradle-api/9.1/com/android/build/api/dsl/PublishingOptions and https://stackoverflow.com/a/71366104. `components.release` no longer works, but testing indicates that `components.default` works.1 parent 2ad6112 commit a1457d1
3 files changed
+27
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
69 | | - | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
0 commit comments