davidB / gradle-getdown-plugin

A gradle plugin to bundle java app + jre with getdown support
Creative Commons Zero v1.0 Universal
16 stars 3 forks source link

makeDigest fails on 0.3.0 #17

Closed andretietz closed 10 years ago

andretietz commented 10 years ago

Seems like since the 0.3.0 the getdown.txt gets not created correctly

gradlew.bat clean assembleApp
:clean
:makeIcons
:compileJava
:processResources
:classes
:jar
:assemble
:copyDist UP-TO-DATE
:makeGetdownTxt
:makeDigest
Generating digest file '.\digest.txt'...
Exception in thread "main" java.io.IOException: m.missing_code
at com.threerings.getdown.data.Application.init(Unknown Source)
at com.threerings.getdown.tools.Digester.createDigest(Unknown Source)
at com.threerings.getdown.tools.Digester.main(Unknown Source)
:makeDigest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':makeDigest'.
        > Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1

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

        BUILD FAILED
davidB commented 10 years ago

digest failed with this error, if some line from getdown.txt like code = ... are set with missing files. Do you customize the template of getdow.txt ? Do you have app/lib/*.jar (especialy those listed in getdown.txt) ? I don't understand why your copyDist is 'UP-TO-DATE' after a clean ?

andretietz commented 10 years ago

I am using the template, and extend it with some lines:

tmplGetdownTxt = tmplGetdownTxt + "\n" +
        "allow_offline = true\n" +
        "ui.background = DE0808\n" +
        "ui.progress = 28, 176, 280, 21\n" +
        "ui.progress_bar = 9E0606\n" +
        "ui.progress_text = FFFFFF\n" +
        "ui.status = 28, 95, 280, 70\n" +
        "ui.status_text = FFFFFF\n"

But yeah, good point, copydist should not be "up-to-date"

Switched back to 0.2.2, it works like a charm (makeGetdownTxt)

andretietz commented 10 years ago

Found the problem:

When I do not use:

distSpec.with {
    from("images") {
        into('app')
    }
}

The error appears

with it, it's fine

davidB commented 10 years ago

I'll check with my sample app.

Else , in groovy you can use multiline string (+ use single quote to avoid evaluation at compile time) :

tmplGetdownTxt = tmplGetdownTxt + '''
        allow_offline = true
        ui.background = DE0808
        ui.progress = 28, 176, 280, 21
        ui.progress_bar = 9E0606
        ui.progress_text = FFFFFF
        ui.status = 28, 95, 280, 70
        ui.status_text = FFFFFF
'''
davidB commented 10 years ago

fix in 0.3.1 (available on jcenter)