GithubHelp home page GithubHelp logo

Comments (5)

stewartbryson avatar stewartbryson commented on July 28, 2024

I'm seeing this as well.

from github-release-gradle-plugin.

xeruf avatar xeruf commented on July 28, 2024

Same here, this is urgent! It prevents me from upgrading everything to gradle 5.0!

from github-release-gradle-plugin.

akasolace avatar akasolace commented on July 28, 2024

I observe something strange (at least to me). I tried to use the plugin in 2 ways:

**option 1) **

apply plugin: 'com.github.breadmoirai.github-release'
githubRelease {

    def _token = GITHUB_TOKEN 
    owner = xxx
    repo = xxx
    releaseAssets.from("$target_dir")

    body {
        token = _token
        if (releaseArtefacts) {
            if (development_stage == '0') {
                tagName = "DEV"
                releaseName = "DEV"
                targetCommitish = "master"
                body = "Latest development version (aimed at developers).\nBuild ... Release on ...."
                prerelease = true
                overwrite = false
                println("DEVELOPMENT version has been released on GitHub")
            } else if (development_stage == '1') {
                tagName = "BETA"
                releaseName = "BETA"
                targetCommitish = "master"
                body = "..................."
                prerelease = true
                overwrite = true
                println("BETA version has been released on GitHub.\nBuild ... Release on ....")
            } 
        }
    }}

this fails with the following error:

FAILURE: Build failed with an exception.
What went wrong: okhttp3/OkHttpClient
Exception is: java.lang.NoClassDefFoundError: okhttp3/OkHttpClient

option 2 (the one I would eventually like to use, i.e use plugin only if certain requirements are met):

task ReleaseToGitHub() {
    group 'tool'

    if (releaseArtefacts && ['0', '1''].contains(development_stage) && upstreamFixed) {
        println("I apply")
        apply plugin: 'com.github.breadmoirai.github-release'
        githubRelease {

            def _token = GITHUB_TOKEN  // required token for your personal access with repo permissions
            owner = 'akasolace'
            repo = 'HO'

            println("$target_dir")
            releaseAssets.from("$target_dir")
            println(releaseAssets)

            body {
                token = _token
                if (releaseArtefacts) {
                    if (development_stage == '0') {
                        tagName = "DEV"
                        releaseName = "DEV"
                        targetCommitish = "master"
                        body = "Latest development version (aimed at developers).\nBuild ... Release on ...."
                        prerelease = true
                        overwrite = false
                    } else {
                        tagName = "BETA"
                        releaseName = "BETA"
                        targetCommitish = "master"
                        body = "..................."
                        prerelease = true
                        overwrite = true
                    }  }  }  }  }}

in that case the task is running without error, it goes though the statement but does not do anything

Could you please tell me what I am doing wrong?
Thank you

from github-release-gradle-plugin.

BreadMoirai avatar BreadMoirai commented on July 28, 2024

@akasolace Try adding this to the top of your build file

buildscript {
  repositories {
    jcenter()
  }
} 

from github-release-gradle-plugin.

akasolace avatar akasolace commented on July 28, 2024

I already have a
repositories { jcenter() }

if I enclose it into a buildscript block then it breaks
if I simply add that extra block it does not change anything. I have the same behaviour as the one described above.

from github-release-gradle-plugin.

Related Issues (20)

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.