Skip to content

Default gradle builds broken? - possibly scripts null #213

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

Closed
1 of 4 tasks
ryanhamilton opened this issue Jun 22, 2022 · 3 comments
Closed
1 of 4 tasks

Default gradle builds broken? - possibly scripts null #213

ryanhamilton opened this issue Jun 22, 2022 · 3 comments
Labels
bug Something isn't working feedback Waiting for feedback fixed Issue fixed and release pending

Comments

@ryanhamilton
Copy link

ryanhamilton commented Jun 22, 2022

I'm submitting a…

  • [x ] bug report
  • feature request
  • other

Short description of the issue/suggestion:
Building even simplest project in latest gradle seems broken.

Steps to reproduce the issue/enhancement:

  1. git clone https://github.com/ryanhamilton/buildbroken
  2. cd buildbroken
  3. gradlew package

THis has the simplest possible modern gradle config. i.e.

buildscript {
    repositories {         mavenCentral()     }
    dependencies {         classpath 'io.github.fvarrui:javapackager:1.6.6'     }
}

apply plugin: 'io.github.fvarrui.javapackager.plugin'
javapackager {     mainClass = 'gdemo.App' }

I know if I add a specific task, that will provide the script defaults etc. and will work but that wasn't what I expected to happen. Should it be?

What is the expected behavior?

Works.

What is the current behavior?

Caused by: java.lang.NullPointerException                                                                            
        at io.github.fvarrui.javapackager.packagers.Packager.copyAdditionalResources(Packager.java:223)              
        at io.github.fvarrui.javapackager.packagers.Packager.createApp(Packager.java:393)                            
        at io.github.fvarrui.javapackager.gradle.AbstractPackageTask.doPackage(AbstractPackageTask.java:45)          
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)                                        
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)      
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)        
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)        
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)                       

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

PackagerSettings [outputDirectory=F:\dev2\XXXXXXXXXXXXXXXXXXXX, licenseFile=null, iconFile=null, generateInstaller=false, mainClass=XXXXXXXXXXXXXXXXX, name=server, displayName=server, version=0.1, description=server, url=null, administratorRequired=false, organizationName=ACME, organizationUrl=, organizationEmail=, bundleJre=false, customizedJre=true, jrePath=null, jdkPath=C:\Program Files\Java\jdk1.8.0_211\jre, additionalResources=[], modules=[], additionalModules=[], platform=windows, envPath=null, vmArgs=[], runnableJar=null, copyDependencies=false, jreDirectoryName=jre, winConfig=WindowsConfig [icoFile=null, headerType=gui, companyName=ACME, copyright=ACME, fileDescription=server, fileVersion=1.0.0.0, internalName=server, language=null, originalFilename=server.exe, productName=server, productVersion=1.0.0.0, trademarks=null, txtFileVersion=0.1, txtProductVersion=0.1, disableDirPage=true, disableProgramGroupPage=true, disableFinishedPage=true, disableRunAfterInstall=true, disableWelcomePage=true, createDesktopIconTask=true, generateSetup=true, generateMsi=true, generateMsm=false, msiUpgradeCode=5ca02ef4-4234-41b4-a8c4-92fad9bfecb7, wrapJar=true, setupLanguages={english=compiler:Default.isl, spanish=compiler:Languages\Spanish.isl}, setupMode=installForAllUsers, signing=null, registry=Registry [entries=[]], removeOldLibs=false, exeCreationTool=launch4j, vmLocation=null], linuxConfig=null, macConfig=null, createTarball=false, createZipball=false, extra={}, useResourcesAsWorkingDir=true, assetsDir=F:\dev2\sqldash3\server\assets, classpath=null, jreMinVersion=null, manifest=Manifest [additionalEntries={}, sections=[]], additionalModulePaths=[], fileAssociations=null, packagingJdk=null, scripts=null]

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • JavaPackager version: 1.6.6 - Earlier versions had same problem.
  • OS version:
  • JDK version:
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

@ryanhamilton ryanhamilton changed the title Latest gradle builds broken? - possibly scripts null Default gradle builds broken? - possibly scripts null Jun 22, 2022
@fvarrui
Copy link
Collaborator

fvarrui commented Jun 23, 2022

Hi @ryanhamilton!

Yes, there's a bug in the default task for Gradle, sorry! scripts property initialization is missing. I've just fixed in JavaPackager 1.6.7-SNAPSHOT branch issue-213. Please, try it and give me some feddback, thanks!

PS: since 1.6.7 is a SNAPSHOT version, you have to install it manually to your local repo. There are instructions in README.

@fvarrui fvarrui added the bug Something isn't working label Jun 23, 2022
@fvarrui fvarrui added fixed Issue fixed and release pending feedback Waiting for feedback labels Jul 11, 2022
@fvarrui
Copy link
Collaborator

fvarrui commented Jul 12, 2022

Branch issue-213 merged into devel.

@fvarrui
Copy link
Collaborator

fvarrui commented Jul 18, 2022

JavaPackager v1.6.7 released to Maven Central. See changes here.

@fvarrui fvarrui closed this as completed Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback Waiting for feedback fixed Issue fixed and release pending
Projects
None yet
Development

No branches or pull requests

2 participants