Giter Club home page Giter Club logo

composer-gradle-plugin's People

Contributors

cristiangm avatar dkostyrev avatar fondesa avatar jkmirko avatar plastiv avatar sloy avatar trevjonez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

composer-gradle-plugin's Issues

Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

gradle version: 4.2
composer plugin version: 0.2.0

I sometimes get this issue when running tests. Any idea why this happens?

org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
	at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:382)
	at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
	at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:74)
	at com.trevjonez.composer.ComposerTask.exec(ComposerTask.kt:97)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:142)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:135)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:122)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:762)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:729)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
	... 28 more

Pulling screenshots from external storage on sdk29 and above

As composer was meant to become a spoon test runner replacement it expect that screenshots would be written using Spoon companion library.

base folder where spoon writes screenshot:
https://github.com/square/spoon/blob/ebd51fbc1498f6bdcb61aa1281bbac2af99117b3/spoon-client/src/main/java/com/squareup/spoon/SpoonRule.java#L98-L100

Is monitored and pulled by composer:

// TODO: Add support for internal storage and external storage strategies.
val folderOnDevice = "/storage/emulated/0/app_spoon-screenshots/${test.className}/${test.testName}"

getExternalStorageDirectory is deprecated in android 29. And its one of thoose rare case where deprecated api throws exception instead of continue to be working normally https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()

making missing screenshots at composer test report on android 29 with application compiled on 29.

As Spoon is abanded as well. Do you think it should be considered to take over companion library as well and fix writing files part in consideration with android access storage recommended practices?

Issue Cannot parse package

With the latest version of the plugin and even the previous versions I always have this error when launching the tests

Task :test-framework:testDebugComposer FAILED
[Thu Jul 11 10:37:37 CEST 2019]: Cannot parse test package from aapt dump badging $APK output.

Not working on windows

It is not working on Windows 7.
I also tried to add the dependency composer "com.gojuno.composer:composer:0.3.0", which is supposed to have support for Windows, but it's also not working.

I get the following exception:

Exception in thread "main" java.lang.IllegalStateException: Unbuffered output is not supported on Windows
	at com.gojuno.commander.os.ProcessesKt$process$1.call(Processes.kt:61)
	at com.gojuno.commander.os.ProcessesKt$process$1.call(Processes.kt)
	at rx.internal.operators.OnSubscribeCreate.call(OnSubscribeCreate.java:72)
	at rx.internal.operators.OnSubscribeCreate.call(OnSubscribeCreate.java:32)
	at rx.Observable.unsafeSubscribe(Observable.java:10256)
	at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100)
	at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
	at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Unable to use apk / testApk properties

Before to updating on Composer Gradle plugin 0.13 I had the following configuration in my build.gradle file:

composer {
  configs {
    debug {
      apk file("build/outputs/apk/debug/app-debug.apk")
    }
  }
}

Composer Gradle plugin 0.13 has changed apk and testApk properties type to RegularFileProperty. I have updated my configuration following way:

composer {
  configs {
    debug {
      apk project.layout.projectDirectory.file("build/outputs/apk/debug/app-debug.apk")
    }
  }
}

But when I try to execute testDebugComposer task I get the following output:

Could not determine the dependencies of task ':app:testDebugComposer'.
> Cannot convert <SOME_PATH>/build/outputs/apk/debug/app-debug.apk to a task.
  The following types/formats are supported:
    - A String or CharSequence task name or path
    - A Task instance
    - A TaskReference instance
    - A Buildable instance
    - A TaskDependency instance
    - A Provider that represents a task output
    - A Provider instance that returns any of these types
    - A Closure instance that returns any of these types
    - A Callable instance that returns any of these types
    - An Iterable, Collection, Map or array instance that contains any of these types

I believe this happens because of this line where RegularFileProperty is passed to dependsOn function. Same applies for testApk and extraApk properties.

Composer Gradle plugin version: 0.13
Gradle version: 5.6.2

Build is failing instantly after adding composer plugin

Composer plugin: 0.3.0
Android Gradle plugin: 3.0.0-rc1

After adding plugin apply plugin: 'composer' I get the following result

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > com.android.build.gradle.api.ApplicationVariant.getOutputs()Ljava/util/List;

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

This part of the stack trace might be useful

Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.api.ApplicationVariant.getOutputs()Ljava/util/List;
    at com.trevjonez.composer.ComposerPlugin.apkForVariant(ComposerPlugin.kt:134)
    at com.trevjonez.composer.ComposerPlugin.getApk(ComposerPlugin.kt:109)
    at com.trevjonez.composer.ComposerPlugin.access$getApk(ComposerPlugin.kt:28)
    at com.trevjonez.composer.ComposerPlugin$observeVariants$1.execute(ComposerPlugin.kt:67)
    at com.trevjonez.composer.ComposerPlugin$observeVariants$1.execute(ComposerPlugin.kt:28)

I will provide more information if needed

Unable to create custom tast

Setup:

buildscript {
  dependencies {
    classpath gradlePlugins.composerPlugin
  }
}

apply plugin: 'com.trevjonez.composer'

import com.trevjonez.composer.ComposerTask
task customTask(type: ComposerTask, dependsOn: ['assembleDebug', 'assembleDebugAndroidTest']) {
...
}

I'm getting:

unable to resolve class com.trevjonez.composer.ComposerTask
   @ line 21, column 1.
     import com.trevjonez.composer.ComposerTask

Overlapping outputs prevents gradle task cacheability

ComposerTask is marked as @CacheableTask and so is participating in gradle cache lifecycle but is not cooperative.

We are observing next crashes on our CI pipelines

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':storage:testDebugComposer'.Open stacktrace
Caused by: java.lang.RuntimeException: Failed to store cache entry for task ':storage:testDebugComposer'Open stacktrace
Caused by: org.gradle.api.GradleException: Could not pack tree 'outputDir': java.io.IOException: Request to write '61599' bytes exceeds size in header of '913483' bytes for entry 'tree-outputDir/logs/emulator-5554/full.logcat'Open stacktrace
Caused by: org.gradle.api.UncheckedIOException: java.io.IOException: Request to write '61599' bytes exceeds size in header of '913483' bytes for entry 'tree-outputDir/logs/emulator-5554/full.logcat'Open stacktrace
Caused by: java.io.IOException: Request to write '61599' bytes exceeds size in header of '913483' bytes for entry 'tree-outputDir/logs/emulator-5554/full.logcat'Close stacktrace
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.write(TarArchiveOutputStream.java:449)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2315)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker$PackingVisitor.storeFileEntry(TarBuildCacheEntryPacker.java:457)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker$PackingVisitor.visitFile(TarBuildCacheEntryPacker.java:389)
at org.gradle.internal.snapshot.RegularFileSnapshot.accept(RegularFileSnapshot.java:60)
at org.gradle.internal.snapshot.DirectorySnapshot.accept(DirectorySnapshot.java:58)
at org.gradle.internal.snapshot.DirectorySnapshot.accept(DirectorySnapshot.java:58)
at org.gradle.internal.snapshot.DirectorySnapshot.accept(DirectorySnapshot.java:58)
at org.gradle.internal.snapshot.CompositeFileSystemSnapshot.accept(CompositeFileSystemSnapshot.java:40)
at org.gradle.internal.fingerprint.impl.DefaultCurrentFileCollectionFingerprint.accept(DefaultCurrentFileCollectionFingerprint.java:118)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker.packTree(TarBuildCacheEntryPacker.java:148)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker.lambda$pack$1(TarBuildCacheEntryPacker.java:138)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.visitOutputTrees(ExecuteActionsTaskExecuter.java:332)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker.pack(TarBuildCacheEntryPacker.java:135)
at org.gradle.caching.internal.packaging.impl.TarBuildCacheEntryPacker.pack(TarBuildCacheEntryPacker.java:120)
at org.gradle.caching.internal.packaging.impl.GZipBuildCacheEntryPacker.pack(GZipBuildCacheEntryPacker.java:42)
at org.gradle.caching.internal.command.BuildCacheCommandFactory$StoreCommand.store(BuildCacheCommandFactory.java:173)
at org.gradle.caching.internal.controller.DefaultBuildCacheController$Pack$1.run(DefaultBuildCacheController.java:205)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.caching.internal.controller.DefaultBuildCacheController$Pack.execute(DefaultBuildCacheController.java:201)
at org.gradle.caching.internal.controller.DefaultBuildCacheController.lambda$store$1(DefaultBuildCacheController.java:179)
at org.gradle.caching.local.internal.DefaultBuildCacheTempFileStore.withTempFile(DefaultBuildCacheTempFileStore.java:46)
at org.gradle.caching.internal.controller.DefaultBuildCacheController.store(DefaultBuildCacheController.java:178)
at org.gradle.internal.execution.steps.CacheStep.store(CacheStep.java:139)
at org.gradle.internal.execution.steps.CacheStep.lambda$executeAndStoreInCache$6(CacheStep.java:131)
at org.gradle.internal.Try$Success.ifSuccessfulOrElse(Try.java:187)
at org.gradle.internal.execution.steps.CacheStep.executeAndStoreInCache(CacheStep.java:130)
at org.gradle.internal.execution.steps.CacheStep.lambda$executeWithCache$2(CacheStep.java:107)
at org.gradle.internal.execution.steps.CacheStep.lambda$executeWithCache$3(CacheStep.java:107)
at org.gradle.internal.Try$Success.map(Try.java:162)
at org.gradle.internal.execution.steps.CacheStep.executeWithCache(CacheStep.java:76)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:66)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:41)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:174)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:166)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:374)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:361)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:354)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:340)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

Running with org.gradle.caching.debug=true results in next warnings

> Task :storage:testDebugComposer
Non-cacheable because Gradle does not know how file 'build/reports/composer/debug/logs/emulator-5554/full.logcat' was created (output property 'outputDir'). Task output caching requires exclusive access to output paths to guarantee correctness. [OVERLAPPING_OUTPUTS]
Appending implementation to build cache key: com.trevjonez.composer.ComposerTask_Decorated@01ed0e65ef381133e7c3807e9a4dde77
Appending additional implementation to build cache key: com.trevjonez.composer.ComposerTask_Decorated@dda74d08a08ed49fa4e0f81bf5e6fefc
Appending input value fingerprint for 'apkInstallTimeout' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'args' to build cache key: 8222d82255460164427051d7537fa305
Appending input value fingerprint for 'debug' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'debugOptions' to build cache key: 9b6eb7ad5d057645a33e4188a4ef73bb
Appending input value fingerprint for 'debugOptions.enabled' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'debugOptions.port' to build cache key: d83d6605a42e65ae05e59d11497bd8b1
Appending input value fingerprint for 'debugOptions.server' to build cache key: f6d7ed39fe24031e22d54f3fe65b901c
Appending input value fingerprint for 'debugOptions.suspend' to build cache key: f6d7ed39fe24031e22d54f3fe65b901c
Appending input value fingerprint for 'defaultCharacterEncoding' to build cache key: d746f44d09fb58d2971f341d24d74c35
Appending input value fingerprint for 'devicePattern' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'devices' to build cache key: 8222d82255460164427051d7537fa305
Appending input value fingerprint for 'enableAssertions' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'ignoreExitValue' to build cache key: c06857e9ea338f3f3a24bb78f8fbdf6f
Appending input value fingerprint for 'instrumentationArguments' to build cache key: 3adf042dcd5b07446bff6de870596db9
Appending input value fingerprint for 'javaVersion' to build cache key: 4a465f4e625f50133941afa67afe36be
Appending input value fingerprint for 'jvmArgs' to build cache key: 8222d82255460164427051d7537fa305
Appending input value fingerprint for 'keepOutput' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'main' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'maxHeapSize' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'minHeapSize' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'shard' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'systemProperties' to build cache key: cfcc5f871f42c7c797557fd17748dc17
Appending input value fingerprint for 'verboseOutput' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input value fingerprint for 'withOrchestrator' to build cache key: f6bd6b3389b872033d462029172c8612
Appending input file fingerprints for 'apk' to build cache key: aa70ca66ca60f2ffc8ea316ae72c1d7f
Appending input file fingerprints for 'bootstrapClasspath' to build cache key: 5fd1e7396e8de4cb5c23dc6aadd7787a
Appending input file fingerprints for 'classpath' to build cache key: 5fd1e7396e8de4cb5c23dc6aadd7787a
Appending input file fingerprints for 'extraApks' to build cache key: 5fd1e7396e8de4cb5c23dc6aadd7787a
Appending input file fingerprints for 'testApk' to build cache key: aa70ca66ca60f2ffc8ea316ae72c1d7f
Appending output property name to build cache key: outputDir

How to specify tests size?

Hi, is it possible to have gradle tasks for tests size? Like... with spoon we can spoonDebugAndroidTestSmall so it runs just the tests annotates with @SmallTest

`verboseOutput` `keepOutput` args are not passed to commander

It looks like verbose and output flags are not passed to the commander process.

  1. Process logs are guarded:

if (print) {
log("Exit code $exitCode: $commandAndArgs,\noutput = \n${outputFile.readText()}")
}

  1. Logs are turned off by default:

redirectOutputTo: File? = null,
keepOutputOnExit: Boolean = false,
unbufferedOutput: Boolean = false,
print: Boolean = false,

  1. process is unconditionally being called AFAIS:

val installApk = process(
commandAndArgs = listOf(adb, "-s", id, "install", "-r", pathToApk),
unbufferedOutput = true,
timeout = timeout
)

My use case.

I am running composer. APK install is failing on the CI and I don't see adb message to get a sense why is it failing. Turning verboseOutput=true keepOutput=true flags in plugin doesn't help, since apparently flags are not being passed down. So at the end all I see is next:

> Task :storage:testDebugComposer
[Tue Feb 25 19:35:37 CET 2020]: Args(appApkPath=/Users/user/Projects/project/storage/build/outputs/apk/androidTest/debug/storage-debug-androidTest.apk, testApkPath=/Users/user/Projects/project/storage/build/outputs/apk/androidTest/debug/storage-debug-androidTest.apk, testRunner=, shard=true, outputDirectory=/Users/user/Projects/project/storage/build/reports/composer/debug, instrumentationArguments=[disableAnalytics, true], verboseOutput=true, keepOutputOnExit=true, devices=[], devicePattern=, installTimeoutSeconds=120, failIfNoTests=true, runWithOrchestrator=false, extraApks=[])
[Tue Feb 25 19:35:37 CET 2020]: 1 connected adb device(s): [AdbDevice(id=emulator-5554, model=Android SDK built for x86_64, online=true)]
[Tue Feb 25 19:35:37 CET 2020]: [emulator-5554] 1 APK to install
[Tue Feb 25 19:35:37 CET 2020]: [emulator-5554] Acquiring lock
[Tue Feb 25 19:35:37 CET 2020]: [emulator-5554] Lock acquired
[Tue Feb 25 19:35:37 CET 2020]: [emulator-5554] Installing apk... pathToApk = /Users/user/Projects/project/storage/build/outputs/apk/androidTest/debug/storage-debug-androidTest.apk
[Tue Feb 25 19:35:47 CET 2020]: [emulator-5554] Failed to install apk /Users/user/Projects/project/storage/build/outputs/apk/androidTest/debug/storage-debug-androidTest.apk
Task :storage:testDebugComposer in storage Finished

> Task :storage:testDebugComposer FAILED
:storage:testDebugComposer (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 10.469 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':storage:testDebugComposer'.
> Process 'command '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

Which isn't very helpful since it doesn't contain any error message.

Run composer on all modules that have androidTests

I'm working on a project that has more than 60 different Gradle Android modules. Some of those have androidTests as well as the app module. Currently we are only running the androidTests in the app module, but we would like to also use composer for all other modules.

When I run ./gradlew testDebugComposer I was expecting composer to run for every module, except that it seems to exit with an error:

Exception in thread "main" java.lang.IllegalStateException: Process [script, -F, /Users/*/project/libraryModule/90180196301875.output, /Users/*/Library/Android/sdk/build-tools/30.0.0/aapt, dump, badging, /Users/*/project/libraryModule/build/outputs/apk/androidTest/debug/libraryModule-debug-androidTest.apk] exited with non-zero code 15 Script started on Tue Aug  4 12:19:19 2020
command: /Users/*/Library/Android/sdk/build-tools/30.0.0/aapt dump badging /Users/*/project/libraryModule/build/outputs/apk/androidTest/debug/libraryModule-debug-androidTest.apk
script: /Users/*/Library/Android/sdk/build-tools/30.0.0/aapt: No such file or directory

Script done on Tue Aug  4 12:19:19 2020

	at com.gojuno.commander.os.ProcessesKt$process$1.subscribe(Processes.kt:119)
	at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
	at io.reactivex.Observable.subscribe(Observable.java:12267)
	at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I'm not sure how to fix this issue or what exactly is going wrong, is this supposed to work?

Graceful Exit 1 handling

Logged gojuno/composer#176 against composer, but seeing if it is felt to go here.

As mentioned in the above issue, any failure in the chain of observers fails, it results in an exit one.

In our case we have custom tasks created to handle this. e.g.:

project.task(testDebugCustomIntegrationTest, type: DefaultTask, dependsOn: [testDebugComposer, clearConnectedDevices])

project.task(clearConnectedDevices, type: ClearDevicesTask, dependsOn: testDebugComposer) {
  mustRunAfter testDebugComposer
}

Where this task is a custom task that goes to each connected emulator and wipes them after a run finishes.

Even if we run with --continue, the process will error and not go to the task that mustRunAfter testDebugComposer.

Automate publishing

While publishing rc06 I may have forgot to pull locally before doing so. The result was an incorrect artifact being pushed to bintray/jcenter for the composer/commander jars. I overwrote the incorrect artifacts as quickly as I could, but such a mistake would be impossible had I been using an automated process driven by the github gui. My apologies if you somehow managed to cache the bad jar files in the 5 minutes between the error and resolution

todo list for myself:

Question - maintained

Out of curiosity, I noticed that composer is now archived, will this be archived as well?

Just curious as there will likely be a need for ongoing base support that the plug in may not be able to support.

instrumentation-arguments are broken on Gradle 5.0

We have found errors on our builds after updating to Gradle 5.0, we had:
instrumentationArgument('notAnnotation', 'android.support.test.filters.FlakyTest')
to ignore tests with that annotation ( until we fix or delete them ), but we saw it's running them now.

I ran the tests of the plugin and everything worked until I added .withGradleVersion("5.0") to GradleRunner.create() on ComposerPluginTest.

Now this test fails:

com.trevjonez.composer.ComposerPluginTest#plugin cascades and collects dsl inputs
with the error:

to contain:
 <["--instrumentation-arguments, screenshotsDisabled, false, screenshotsEngine, uiAutomator, --verbose-output, true, --keep-output-on-exit, --install-timeout, 10",
    "Successfully installed apk",
    "Starting tests",
    "Test run finished, 0 passed, 0 failed",
    "Error: 0 tests were run."]>
but could not find:
 <["--instrumentation-arguments, screenshotsDisabled, false, screenshotsEngine, uiAutomator, --verbose-output, true, --keep-output-on-exit, --install-timeout, 10"]>

actually the only thing missing is --instrumentation-arguments, screenshotsDisabled, false, screenshotsEngine, uiAutomator,

Using the version 0.7.0 of the plugin it works fine ( if you don't need Orchestrator or any other feature added later ), but 0.8.0 or newer fails.

Tests duplication and wrong count

Hello!

First of all, thank you very mush for developing this plugin!

We are actively writing tests for our app and decided we could use some parallel execution. We set up composer, but we're experiencing some issues with tests count. We have 365 tests (not counting parametrized as separate tests), but running them with composer gives us difference results each time.

Examples:
Original
image

Composer run 1
image

Composer run 2 (same branch)
image

Seems like there are appearing some duplicating tests with 0 time length
image
image

Our setup:
Composer plugin v.10.0
Gradle 5.1.1
Android Build Tools 3.3.0

junit4
parametrized tests
orchestrator (support version)

Composer setup

    instrumentationArgument("clearPackageData", "true")
    configs {
        devDebug {
            withOrchestrator true
            outputDirectory project.properties['test.reports.dir'] + "/composer"
        }
    }
}

Although, it seems more like composer problem ): Could you, please, tell what version of composer are you using for plugin v10.0?

Support for AndroidX Orchestrator

Hi there, we've recently applied the AndroidX refactoring to our project but ran into issues when running our instrumentation tests via this plugin. The problem seems to be that the test orchestrator class and package names differ for Androidx, see the AndroidJUnitRunner documentation. Would it be possible to support the new test orchestrator in addition to the old one?

Problem with gradle 6.4

after switching to gradle 6.4 I am seeing this issue:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:testNoGethForFDroidOfflineDebugComposer'.
> The value for task ':app:testNoGethForFDroidOfflineDebugComposer' property 'mainClass' is final and cannot be changed any further.

* 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

BUILD FAILED in 3m 1s

Feature-Request: add composer task

First of all thanks for this plugin!

What would be really great if this plugin creates one task that is just called "composer" - this way the CI does not need to know about the flavor being used and can just do "./gradlew composer"

Composer tasks can't be run in parallel

I'm not sure how common use case is but running multiple composer gradle tasks in parallel results in issue because they are state (android device or emulator) dependant.

Background on a goal I want to achieve. I want to run all android tests across all gradle modules. We started modularization journey sometime ago but we were keeping the tests in main apk module until now. When moving android tests into corresponding modules we start hitting the wall with infrastructure support. Like having common results report for example.

Current issue:

  • For a multi module project (Gradle 6.0.1, AGP 3.5.3, CGP 0.13.1)
rootprojectdir
├── main
│   ├── build.gradle
├── storage
│   ├── build.gradle
  • Running android tests with orchestrator
apply plugin: 'com.trevjonez.composer'

composer {
    withOrchestrator true
    instrumentationArgument('clearPackageData', 'true') // orchestrator param
}

dependencies {
    androidTestUtil "androidx.test:orchestrator:1.2.0"
    composer "com.gojuno.composer:composer:0.6.0"
}
  • in parallel mode ./gradlew testDebugComposer --parallel

Results in error.

My current understanding of the issue is:

  • Gradle treats :main:testDebugComposer and :storage:testDebugComposer as independent
  • second task executes adb install -r orchestrator-1.2.0.apk again while first task is still running
  • adb install force stops orchestrator process on the device preventing it from finishing test run gracefully

What to do with it is an open question.

  • maybe adding to readme that composer should be run with ./gradlew testDebugComposer --no-parallel explicitly is enough
  • maybe there should be a parent task configuration which would be multimodule aware
  • maybe installing orchestrator should be lazy and composer task should check if apk is already there

Provide report file name

Feature request.

I found it useful to have report filename printed, because then it is easy to navigate from terminal by just clicking it. Like lint and spoon runner does. Let me know if you think this addition would fit your vision of plugin development.

image

How to take screenshot with Composer and Espresso Android.

Hello.
How to take screenshot with Composer with Gradle And Espresso Android?

My code on gradle:
composer {
instrumentationArgument('notAnnotation', 'com.trevjonez.kontrast.KontrastTest')
withOrchestrator true
shard true
instrumentationArgument('screenshotsDisabled', 'false')
configs {
debug {
instrumentationArgument('screenshotsEngine', 'uiAutomator')
keepOutput true
}
}
}

And i utilize version 0.12.0

AGP + Gradle conflict

I'm about to update to 0.11.1 and I'm going through all the needed changes. I see in the readme

Composer plugin version Gradle version Android plugin version
0.11.* 5.3.1 3.3.2, 3.5.0-alpha09*

However AGP 3.3.2 doesn't "come" with Gradle 5.3.1. I would have to manually update my gradle-wrapper.properties. Is this something that you are advocating for?

android.os.TransactionTooLargeException

Not sure if I should be opening this here or on the composer page, let me know.
Opened it here because I am using the gradle plugin.

This is occurring when the test run finishes after running on one emulator. Not sure if this is due to the large amount of test failures. A previous run (with an emulator and hardware device) hung on finish rather than crashed. XML file was generated with that run, but not with this one.

12-28 11:19:30.964 2193-2208/com.x.x I/TestRunner: run finished: 88 tests, 65 failed, 0 ignored
12-28 11:19:31.158 2193-2204/com.x.x I/art: Background partial concurrent mark sweep GC freed 27832(2MB) AllocSpace objects, 199(69MB) LOS objects, 3% free, 115MB/119MB, paused 1.931ms total 170.351ms
12-28 11:19:31.318 2193-2208/com.x.x I/MonitoringInstr: waitForActivitiesToComplete() took: 0ms
12-28 11:19:31.319 2193-2193/com.x.x I/MonitoringInstr: Activities that are still in CREATED to STOPPED: 0
12-28 11:19:31.333 2193-2204/com.x.x I/art: Background partial concurrent mark sweep GC freed 8335(386KB) AllocSpace objects, 9(27MB) LOS objects, 2% free, 149MB/153MB, paused 2.077ms total 159.803ms
12-28 11:19:31.338 2193-2208/com.x.x E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 13370232)
12-28 11:19:31.339 2193-2208/com.x.x E/AndroidRuntime: FATAL EXCEPTION: Instr: android.support.test.runner.AndroidJUnitRunner
Process: com.x.x, PID: 2193
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 13370232 bytes
at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:5385)
at android.app.Instrumentation.finish(Instrumentation.java:213)
at android.support.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.java:330)
at android.support.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.java:395)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:384)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)
Caused by: android.os.TransactionTooLargeException: data parcel size 13370232 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ActivityManagerProxy.finishInstrumentation(ActivityManagerNative.java:4531)
at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:5383)
at android.app.Instrumentation.finish(Instrumentation.java:213) 
at android.support.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.java:330) 
at android.support.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.java:395) 
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:384) 
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)

 

Configuration is not working

Following the Readme file on your repo I have configured composer in my top build.gradle file:

//All dependencies are gathered in this file
apply from: 'dependencies.gradle'
apply plugin: 'composer'

buildscript {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
        classpath 'com.github.trevjonez.composer-gradle-plugin:plugin:0.10.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

We are working with different modules in our project, hence the // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files notion.

After syncing the project I get the following exceptions:

Caused by: com.trevjonez.composer.ComposerPlugin$MissingPluginException: Failed to configure com.trevjonez.composer.ComposerPlugin plugin on project: :
  Expected plugin: `com.android.build.gradle.api.AndroidBasePlugin` was not applied.
  If you believe this is an issue or missing feature, please consider opening an issue on github.
https://github.com/trevjonez/composer-gradle-plugin
	at com.trevjonez.composer.ComposerPlugin$apply$3.execute(ComposerPlugin.kt:63)
	at com.trevjonez.composer.ComposerPlugin$apply$3.execute(ComposerPlugin.kt:26)
	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1$1.run(DefaultListenerBuildOperationDecorator.java:155)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:58)
	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:152)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction.execute(DefaultListenerBuildOperationDecorator.java:149)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy33.afterEvaluate(Unknown Source)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:187)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:184)
	at org.gradle.api.internal.project.DefaultProject.stepEvaluationListener(DefaultProject.java:1418)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:193)
	... 95 more

Not sure what to do here?

java.lang.NoSuchMethodError

Hello I tried integrate this plugin, but I faced with this exception

version of gradle wrapper - Gradle 3.5
plugin version - 0.1.2
composer version - 0.2.3

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:98)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:68)
        at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:94)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:47)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
Caused by: java.lang.NoSuchMethodError: com.trevjonez.composer.ComposerTask.setArgs(Ljava/util/List;)Lorg/gradle/api/tasks/JavaExec;
        at com.trevjonez.composer.ComposerTask.exec(ComposerTask.kt:78)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:692)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:675)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:115)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:109)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:90)
        ... 23 more

Gradle Configuration Cache support

Running ./gradlew --configuration-cache testDebugComposer with composer 1.0.0-rc08 on Gradle 7.0.1, AGP 4.1.2, Kotlin 1.4.32 results in error

What went wrong:
Configuration cache problems found in this build.

5 problems were found storing the configuration cache, 4 of which seem unique.
Task :database:testDebugComposer of type com.trevjonez.composer.ComposerTask: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfiguration', a subtype of 'org.gradle.api.artifacts.Configuration', as these are not supported with the configuration cache.
See https://docs.gradle.org/7.0.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types

There are suggested replacement available at the documentation. Although I haven't check if they are suitable replacements.

Composer 0.3.2 removed test runner param

Composer plugin 0.5.2 with composer 0.3.2 results in crash.

https://github.com/gojuno/composer/releases/tag/v0.3.2

Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '--test-package' but no main parameter was defined in your arg class
	at com.beust.jcommander.JCommander.getMainParameter(JCommander.java:887)
	at com.beust.jcommander.JCommander.parseValues(JCommander.java:705)
	at com.beust.jcommander.JCommander.parse(JCommander.java:312)
	at com.beust.jcommander.JCommander.parse(JCommander.java:291)
	at com.gojuno.composer.ArgsKt.parseArgs(Args.kt:121)
	at com.gojuno.composer.MainKt.main(Main.kt:34)

Tasks not showing in task list

I added composer gradle plugin as described in README. I then went to check that task was added:

./gradlew app:tasks --all | grep -i composer

But got zero results. After triple checking my setup I decided to just run the task /gradlew app:testDebugCompose and everything worked fine. The tests started up right away. I'm not sure why the composer task(s) didn't get add to the all tasks list

Dynamic Feature support is not implemented correctly

The similarity between the Application plugin and Dynamic Feature plugin in AGP made it seem as though the same implementation would work for both. This is not actually the case.

Lets setup a simple example of a project to use in a test so we can TDD through it.

Support library modules

I was adding Composer to one of our libraries and I found that message:
composer plugin only applicable to android application projects, open an issue if you need something else.

Why?
Currently libraries can run UI tests, and with Instant Apps and App Bundle it will happen more frequently.

In this case we where using Spoon and they do support libraries ( hacky code here )
and you need to add something else ( issue to update the readme )

Would be possible to do something similar here?

Getting warning: "WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'."

After adding the composer-gradle-plugin I always get the following warning which is very annoying. Can this be updated?

WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
REASON: It is currently called from the following trace:
java.lang.Thread.getStackTrace(Thread.java:1556)
com.android.build.gradle.internal.errors.DeprecationReporterImpl.reportDeprecatedApi(DeprecationReporterImpl.kt:79)
com.android.build.gradle.internal.api.BaseVariantImpl.getAssemble(BaseVariantImpl.java:571)
com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated.getAssemble(null:-1)
com.trevjonez.composer.internal.ComposerApplicationPlugin.getApk(ComposerApplicationPlugin.kt:46)
com.trevjonez.composer.internal.ComposerApplicationPlugin.getApk(ComposerApplicationPlugin.kt:28)
com.trevjonez.composer.internal.ComposerBasePlugin.configureTaskDslLevelProperties(ComposerBasePlugin.kt:95)
com.trevjonez.composer.internal.ComposerBasePlugin.access$configureTaskDslLevelProperties(ComposerBasePlugin.kt:34)
com.trevjonez.composer.internal.ComposerBasePlugin$observeVariants$1$1.execute(ComposerBasePlugin.kt:80)
com.trevjonez.composer.internal.ComposerBasePlugin$observeVariants$1$1.execute(ComposerBasePlugin.kt:34)
org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:41)
org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:41)

Kind regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.