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

Bintray upload throws: could not get unknown property 'conf' error on Kotlin multiplatform projects #256

Closed
warnyul opened this issue Sep 23, 2018 · 14 comments

Comments

@warnyul
Copy link
Contributor

warnyul commented Sep 23, 2018

I have the following configuration on my multiplatform projects (android, common, js, native)

apply plugin: 'com.jfrog.bintray'

bintray {
    user = System.getenv('BINTRAY_USER')
    key = System.getenv('BINTRAY_API_KEY')
    override = true // for multi-platform Kotlin/Native publishing
    publications = ['prefessor']
    dryRun = false
    publish = false

    pkg {
        userOrg = 'wupdigital'
        repo = 'wup-digital-maven'
        name = project.name
        licenses = ['Apache-2.0']
        vcsUrl = 'https://github.com/wupdigital/prefessor'
        websiteUrl = 'https://github.com/wupdigital/prefessor'
        issueTrackerUrl = 'https://github.com/wupdigital/prefessor/issues'
        githubRepo = 'wupdigital/prefessor'
        githubReleaseNotesFile = 'CHANGELOG.md'
        labels = [
                'Some tags'
        ]

        version {
            name = project.version
            vcsTag = project.version
            released = new Date()
        }
    }
}

// This is required for K/N publishing
bintrayUpload.dependsOn publishToMavenLocal

// This is for easier debugging of bintray uploading problems
bintrayUpload.doFirst {
    publications = project.publishing.publications.findAll { !it.name.contains('-test') }.collect {
        println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'")
        it
    }
}

bintrayUpload.enabled = isRelease()

When I run bintray upload, I get following error:

Execution failed for task ':prefessor-common:bintrayUpload'.
> Could not get unknown property 'conf' for task ':prefessor-common:bintrayUpload' of type com.jfrog.bintray.gradle.tasks.BintrayUploadTask.

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':prefessor-common:bintrayUpload'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:105)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:79)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        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.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        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.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
        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: groovy.lang.MissingPropertyException: Could not get unknown property 'conf' for task ':prefessor-common:bintrayUpload' of type com.jfrog.bintray.gradle.tasks.BintrayUploadTask.
        at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:83)
        at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:61)
        at com.jfrog.bintray.gradle.tasks.BintrayUploadTask_Decorated.getProperty(Unknown Source)
        at com.jfrog.bintray.gradle.tasks.BintrayUploadTask$_bintrayUpload_closure2.doCall(BintrayUploadTask.groovy:221)
        at com.jfrog.bintray.gradle.tasks.BintrayUploadTask.bintrayUpload(BintrayUploadTask.groovy:213)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
        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.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
        ... 33 more
@SalomonBrys
Copy link

Workaround:

publications = project.publishing.publications.findAll { !it.name.contains('-test') }.collect {
        println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'")
        it.name // << WORKAROUND IS HERE
    }

@ilmat192
Copy link

It looks like #228 can fix it.

@warnyul
Copy link
Contributor Author

warnyul commented Jan 17, 2019

Probably, it fix it, however there are two typo. See #257

@jershell
Copy link

When will you fix the bug? PR waiting more time that 1 year

eyalbe4 pushed a commit that referenced this issue Oct 16, 2019
* Fix unknown property reference in BintrayUploadTask #256

* Fix type cast #256
@dotCipher
Copy link

If this is merged, can we cut a bugfix release with it?

@neworld
Copy link

neworld commented Nov 11, 2019

This issue is blocking me as well. The workaround is not working using kotlin-dsl.

@Him188
Copy link

Him188 commented Feb 15, 2020

Use plugin version 1.8.4-jetbrains-3

@asarazan
Copy link

I don't see that plugin version anywhere. Can you give more explanation how to use it?

Also to the Bintray team, what's the hold-up on publishing the merged fix for such an obvious typo in your code?

@Him188
Copy link

Him188 commented Mar 21, 2020

I don't see that plugin version anywhere. Can you give more explanation how to use it?

Also to the Bintray team, what's the hold-up on publishing the merged fix for such an obvious typo in your code?

You may need 'kotlin-eap' repository? I'm not sure. You may get help from my project here, see 'build.gradle.kts'

@asarazan
Copy link

Ah close actually. Just tracked it down in maven(url="https://dl.bintray.com/jetbrains/kotlin-native-dependencies")

@asarazan
Copy link

asarazan commented Apr 5, 2020

Still radio silence from Jfrog. Guess it's back to filing jira tickets on Sonatype.

@martinbonnin
Copy link

martinbonnin commented Apr 5, 2020

For what it's worth, you can upload to bintray without the bintray plugin, just using the maven-publish plugin. It's working well with multiplatform artifacts and is bundled inside Gradle. For an exemple, you can check https://github.com/paug/openfeedback-android-sdk/blob/master/build.gradle.kts#L86

@eyalbe4
Copy link
Contributor

eyalbe4 commented Apr 6, 2020

Apologies for not being able to attend to this sooner!
Version 1.8.5 with #257 is now released.

@asarazan
Copy link

asarazan commented Apr 6, 2020

Thank you, much appreciated!

@warnyul warnyul closed this as completed Apr 15, 2020
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

No branches or pull requests

10 participants