BreadMoirai / github-release-gradle-plugin

A Gradle Plugin to send Releases to Github
Apache License 2.0
108 stars 26 forks source link

No signature of method: okhttp3.Request$Builder.tap() #20

Closed dominiccarrington closed 5 years ago

dominiccarrington commented 5 years ago

Java: 1.8.0_201 Gradle: 4.10.2

Whenever I run the githubRelease task, I get this error: No signature of method: okhttp3.Request$Builder.tap() is applicable for argument types: (com.github.breadmoirai.githubreleaseplugin.GithubApi$_connect_closure1) values: [com.github.breadmoirai.githubreleaseplugin.GithubApi$_connect_closure1@b4f42b] Possible solutions: tag(java.lang.Object), wait(), get(), head(), any(), grep()

Gradle is setup in a subproject structure.

Subproject build.gradle:

buildscript {
    repositories {
        maven {
            name = "gradle"
            url = "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath 'gradle.plugin.com.github.breadmoirai:github-release:2.2.7'
    }
}
apply plugin: 'com.github.breadmoirai.github-release'

version = "0.1.0"
group = "com.ragegamingpe.shulkerinvent" // http://maven.apache.org/guides/mini/guide-naming-conventions.html

ext.priv = parseConfig(file("private.properties"))

tasks.githubRelease.dependsOn "build"

githubRelease {
    owner 'dominiccarrington'
    repo 'ShulkerInventory'
    token "${priv.githubToken}"
    releaseAssets {
        FilenameFilter filter = { dir, filename -> filename.contains(project.version) }
        releaseAssets = jar.destinationDir.listFiles filter
    }
}

def parseConfig(File config) {
    config.withReader {
        def prop = new Properties()
        prop.load(it)
        return (new ConfigSlurper().parse(prop))
    }
}
BreadMoirai commented 5 years ago

I've updated the plugin to be compatible with older gradle versions before 5.x. Please try out ver 2.2.8