Kadir İşler
02/16/2023, 3:04 PMCicero Hellmann
02/16/2023, 3:50 PMTransforming ui-tooling-1.3.3.aar (androidx.compose.ui:ui-tooling:1.3.3) with IdentityTransform
5918
Transforming ui-tooling-1.3.3.aar (androidx.compose.ui:ui-tooling:1.3.3) with ExtractAarTransform
5919
Transforming ui-tooling-1.3.3.aar (androidx.compose.ui:ui-tooling:1.3.3) with AarTransform
In this build I picked the Transforming operation is happening 64721 times.
For example Transforming lifecycle-runtime-ktx-2.5.1.aar (androidx.lifecycle:lifecycle-runtime-ktx:2.5.1) with IdentityTransform
happens 186 time in one build.
And there are multiple transformations for this specific library.
I had this linked to me https://docs.gradle.org/current/userguide/artifact_transforms.html
But I couldn’t make much sense of how this could impact mu build or how I could use it to speed my build up.
Could someone tell me what is this and why is it happening so often?
How could I prevent it?Mike Cumings
02/17/2023, 9:53 PMColton Idle
02/18/2023, 2:13 AMtasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
id like to delete it, but no one knows why its there and what would happen if we removed it. lmaoVaios Tsitsonis
02/20/2023, 2:07 PMAnthony Kasapi
02/20/2023, 10:26 PM./gradlew bundleRelease
Anthony Kasapi
02/20/2023, 10:27 PMAnthony Kasapi
02/20/2023, 10:27 PMSahil Arora
02/21/2023, 7:00 AMSahil Arora
02/21/2023, 7:00 AMProcess 'command 'C:\Users\Sahil Arora\Downloads\flutter_windows_3.3.10-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.* Get more help at https://help.gradle.org
Esa Firman
02/21/2023, 3:06 PMproject.configurations.configureEach {
resolutionStrategy.dependencySubstitution {
modulesToBeSubstituted.forEach { A ->
substitute(module(A)).using(project(A))
}
}
}
And checking the AGP code to avoid this warning we need to resolve it after task graph is ready.
After wrapping the code above in taskGraph.whenReady
the warning is gone and the substitution is working correctly.
Questions:
1. Why a dependency substitution rules in our plugin triggering a dependency resolution? We have another rules inside a gradle script (*.gradle) but it’s working fine
2. Will there be an issue with adding a substitution rules after task graph ready?
3. What’s the alternative in this case?
Thank youSai Vara Prasad
02/22/2023, 2:14 PMEsa Firman
02/23/2023, 3:36 AMassemble
task
2. Created from bundle
task and turned into APK with bundletools
Colton Idle
02/24/2023, 7:06 PMrepositories {
google()
maven { url '<https://maven.google.com>' }
}
Colton Idle
02/24/2023, 8:07 PMandroid.enableJetifier=true
even though you don't need it (i.e. all libraries are androidx) will still slow down your build? Like. Does the simple presence of it break incremental compilation?Deependra Kumar
02/25/2023, 6:55 PMTrevJonez
02/28/2023, 6:44 PMZak Taccardi
02/28/2023, 9:58 PMconnectedDebugAndroidTest
results to gradle build scans? Or do I have to wire the code in a custom way to achieve this?Raj Bopche
03/02/2023, 3:03 AMretrofit:2.9.0
, should I mention this dependency in each module’s build file?
What is the best way to manage them centrally?Esa Firman
03/03/2023, 12:10 PMproject
to module
(vice versa) substitution?TrevJonez
03/03/2023, 4:36 PMvariant.sources.kotlin?.addGeneratedSourceDirectory(
genTask,
GenSourcesTask::kotlinOutputDirectory
) // not being compiled or ran thru KSP
variant.sources.assets?.addGeneratedSourceDirectory(
genTask,
GenSourcesTask::assetsOutputDirectory
) // assets get picked up and bundle correctly
Any pro tips from people that have used this API before?Rohan Maity
03/08/2023, 10:28 AMandroidx.activity:activity:1.2.4
I checked the tree to identify where its coming from androidx.fragment:fragment:1.1.0 -> 1.3.6
which again comes from +--- androidx.appcompat:appcompat:1.1.0 -> 1.2.0
now
When I switch to release variant or build release variant then Its unable to resolve the classes/methods coming from this version but for debug it works
We have appcompat_version = "1.2.0"
which is simple implementation()
we use same version for debug and release
We also have fragment-ktx = 1.2.5
but that is also used in release and debugAndrea Di Menna
03/10/2023, 8:43 AMenableUnitTestCoverage
and intermittently failing tasks in a multi-module project running coverage report tasks in parallel?
We are seeing frequent exceptions with AGP 7.4.0 like the following
Caused by: java.io.UncheckedIOException: Unable to generate Jacoco report
at com.android.build.gradle.internal.coverage.JacocoReportTask$JacocoReportWorkerAction.execute(JacocoReportTask.kt:272)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:49)
at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:30)
at org.gradle.workers.internal.IsolatedClassloaderWorkerFactory$1.lambda$execute$0(IsolatedClassloaderWorkerFactory.java:57)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.IsolatedClassloaderWorkerFactory$1.execute(IsolatedClassloaderWorkerFactory.java:49)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:212)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:187)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:120)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:162)
at org.gradle.internal.Factories$1.create(Factories.java:31)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:114)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:157)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:126)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 5 more
Caused by: java.util.zip.ZipException: ZipFile closed
at java.base/java.util.zip.ZipFile.ensureOpenOrZipException(ZipFile.java:944)
at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:1032)
at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:483)
at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.jacoco.report.internal.html.resources.Resources.copyResource(Resources.java:130)
at org.jacoco.report.internal.html.resources.Resources.copyResources(Resources.java:112)
at org.jacoco.report.html.HTMLFormatter.createVisitor(HTMLFormatter.java:192)
at com.android.build.gradle.internal.coverage.JacocoReportTask$JacocoReportWorkerAction$Companion.generateReport(JacocoReportTask.kt:310)
at com.android.build.gradle.internal.coverage.JacocoReportTask$JacocoReportWorkerAction.execute(JacocoReportTask.kt:263)
... 38 more
and I suspect the issue might be in using class loader isolation in the worker actions here
Do you have any thoughts on this? ThanksEileen Yau
03/10/2023, 8:03 PM./gradlew -Dorg.gradle.jvmargs=-Xmx6g dependencyBan app:licensee lintAll --stacktrace >> stacktrace.log
We recently upgrade the AGP plugin to 7.4.1 when this issue has started. We bumped it to 7.4.2.
The last few lines of the logs from daemon:
[2023-03-10T15:54:59Z] ----- Last 20 lines from daemon log file - daemon-430.out.log -----
[2023-03-10T15:54:59Z] Property 'potential-bugs>DuplicateCaseInWhenExpression' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'potential-bugs>MissingWhenCase' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'potential-bugs>RedundantElseInWhen' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'style>ForbiddenPublicDataClass' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'formatting>TrailingComma' is deprecated. Rule is split between `TrailingCommaOnCallSite` and `TrailingCommaOnDeclarationSite` now..
[2023-03-10T15:54:59Z] Property 'style>LibraryCodeMustSpecifyReturnType' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'complexity>ComplexMethod' is deprecated. Rule is renamed to `CyclomaticComplexMethod` to distinguish between Cyclomatic Complexity and Cognitive Complexity.
[2023-03-10T15:54:59Z] Property 'style>LibraryEntitiesShouldNotBePublic' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'potential-bugs>DuplicateCaseInWhenExpression' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'potential-bugs>MissingWhenCase' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'potential-bugs>RedundantElseInWhen' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] Property 'style>ForbiddenPublicDataClass' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'formatting>TrailingComma' is deprecated. Rule is split between `TrailingCommaOnCallSite` and `TrailingCommaOnDeclarationSite` now..
[2023-03-10T15:54:59Z] Property 'style>LibraryCodeMustSpecifyReturnType' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'complexity>ComplexMethod' is deprecated. Rule is renamed to `CyclomaticComplexMethod` to distinguish between Cyclomatic Complexity and Cognitive Complexity.
[2023-03-10T15:54:59Z] Property 'style>LibraryEntitiesShouldNotBePublic' is deprecated. Rule migrated to `libraries` ruleset plugin.
[2023-03-10T15:54:59Z] Property 'potential-bugs>DuplicateCaseInWhenExpression' is deprecated. Rule deprecated as compiler performs this check by default.
[2023-03-10T15:54:59Z] e: error: 'default' is an invalid Java enum value name
[2023-03-10T15:54:59Z] e: error: 'default' is an invalid Java enum value name
[2023-03-10T15:54:59Z] e: error: 'default' is an invalid Java enum value name
[2023-03-10T15:54:59Z] ----- End of the daemon log -----
Colton Idle
03/11/2023, 7:29 AMnight
03/11/2023, 9:05 AMSergey Boishtyan
03/15/2023, 5:55 PMDoni
03/20/2023, 1:37 AMcompileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
Is it safe to use jvmTarget 11 on android? is there any side effect from it like runtime error on random devices that not supporting java 11 ?Esa Firman
03/21/2023, 2:51 AMbuild.gradle.kts
with kotlin-dsl
while the test project use build.gradle
When I run the test, it cannot find com.android.build.gradle.LibraryExtension
class in the classpath, and when I check the android
extension, the class for that extension is com.android.build.gradle.LibraryExtension_Decorated
Why this can happen? Thanks in advanceNuh Koca
03/21/2023, 11:41 PM|-- app -> Can depend on any module
|-- features
|-- aModule
|-- impl -> can only depend on public-api
|-- public-api -> can only depend on public-api
|-- bModule
|-- impl -> can only depend on public-api
|-- public-api -> can only depend on public-api
Is it possible to have a Gradle
rule in which I would be able to block an impl
module cannot from depending on another impl
module but `public-api`s only?Nuh Koca
03/21/2023, 11:41 PM|-- app -> Can depend on any module
|-- features
|-- aModule
|-- impl -> can only depend on public-api
|-- public-api -> can only depend on public-api
|-- bModule
|-- impl -> can only depend on public-api
|-- public-api -> can only depend on public-api
Is it possible to have a Gradle
rule in which I would be able to block an impl
module cannot from depending on another impl
module but `public-api`s only?ephemient
03/21/2023, 11:57 PMNuh Koca
03/22/2023, 12:34 AM