Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bitrise ci support #50

Merged
merged 2 commits into from
Jan 16, 2016
Merged

Conversation

vgaidarji
Copy link
Contributor

I've tested changes locally and I'm getting the same error
> org.apache.http.entity.mime.content.ByteArrayBody.<init>([BLorg/apache/http/entity/ContentType;Ljava/lang/String;)V.

Testing process:

  1. I'm updating plugin version in gradle.properties
  2. Publishing modified plugin version (2.5.0 for ex.) using command ./gradlew publishToMavenLocal
  3. Switching to AS and modifying dependencies
buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.5.0'
    }
}
  1. Executing coveralls task ./gradlew coveralls and getting error
* What went wrong:
Execution failed for task ':app:coveralls'.
> org.apache.http.entity.mime.content.ByteArrayBody.<init>([BLorg/apache/http/entity/ContentType;Ljava/lang/String;)V

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:coveralls'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.NoSuchMethodError: org.apache.http.entity.mime.content.ByteArrayBody.<init>([BLorg/apache/http/entity/ContentType;Ljava/lang/String;)V
        at org.apache.http.entity.mime.MultipartEntityBuilder.addBinaryBody(MultipartEntityBuilder.java:131)
        at org.apache.http.entity.mime.MultipartEntityBuilder$addBinaryBody$0.call(Unknown Source)
        at org.kt3k.gradle.plugin.coveralls.CoverallsTask$_postJsonToUrl_closure1.doCall(CoverallsTask.groovy:44)
        at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:432)
        at groovyx.net.http.HTTPBuilder.request(HTTPBuilder.java:366)
        at groovyx.net.http.HTTPBuilder$request.call(Unknown Source)
        at org.kt3k.gradle.plugin.coveralls.CoverallsTask.postJsonToUrl(CoverallsTask.groovy:42)
        at org.kt3k.gradle.plugin.coveralls.CoverallsTask$postJsonToUrl$0.callCurrent(Unknown Source)
        at org.kt3k.gradle.plugin.coveralls.CoverallsTask.coverallsAction(CoverallsTask.groovy:152)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 14 more

But, if I switch to 2.4.0x version and execute coveralls task in AS in the same project - it works fine.

It's a bit weird, as I didn't change dependencies versions in plugin.

Probably, I'm doing local plugin test in a wrong way.

@kt3k
Copy link
Owner

kt3k commented Jan 16, 2016

Thanks for the contribution.

The change itself seems OK.

That behaviour happens maybe because of the incompatibilities of the v4.1 and v4.3 of httpmime. This plugin explicitly depends on httpmime 4.3 but in some settings strangely v4.1 is used. (That signature in the error message doesn't exist in v4.1. Maybe we should drop dependency of httpmime.)

Thanks for the contribution. I'll publish in a few days.

kt3k added a commit that referenced this pull request Jan 16, 2016
@kt3k kt3k merged commit 4efe96c into kt3k:master Jan 16, 2016
@vgaidarji
Copy link
Contributor Author

Got it.
It means that I've tested plugin correctly by publishing it to mavenLocal, right?

Once the new version of plugin will be ready, I'll check everything on a real project and provide a feedback here.

@kt3k
Copy link
Owner

kt3k commented Jan 18, 2016

I published this version as v2.5.0 and v2.5.0-x to bintray and maven.
v2.5.0-x is a bit modified version. It depends on httpmime-4.1. (v2.5.0 depends on httpmime-4.3)

Maybe you need v2.5.0-x.

@vgaidarji
Copy link
Contributor Author

Great news, thank you @kt3k.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants