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

UI doesnt build anymore with gradle locally #776

Open
marikaris opened this issue Sep 6, 2024 · 1 comment
Open

UI doesnt build anymore with gradle locally #776

marikaris opened this issue Sep 6, 2024 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@marikaris
Copy link
Collaborator

How to Reproduce

Run clean install in intellij

Expected behavior

Build succeeds and ui is build as well

Observed behavior

Build fails because UI refuses to build. UI does build and run tests just fine when running yarn build and yarn install in ui folder. Build succeeds when all building is removed from gradel file:

plugins {
    id "base"
    id "com.github.node-gradle.node" version "7.0.2"
}

def nodeSpec = {
    version = '16.16.0'
    yarnVersion = '1.22.22'
    npmVersion = "8.17.0"
    download = true
}

node {
    with nodeSpec
}

//task format(type: YarnTask, dependsOn: yarn_install) {
//    args = ['run', 'format']
//    inputs.files(fileTree('src'))
//    outputs.dir('src')
//}
//
//task mybuild(type: YarnTask, dependsOn: yarn_install) {
//    inputs.file('package.json')
//    inputs.files(fileTree('src'))
//    inputs.files(fileTree('public'))
//    inputs.file('vite.config.js')
//    inputs.file('tsconfig.json')
//    inputs.file('shims-vue.d.ts')
//    inputs.file('jest.config.js')
//    inputs.file('tsconfig.node.json')
//    inputs.file('index.html')
//    outputs.dir('dist')
//
//    outputs.cacheIf { false }
//    args = ['run', 'build']
//}

task test(type: YarnTask) {
    args = ['run', 'test']
}

/* convert build files into one apps.jar that we can use as a dependency in the java part */
task createJar(type: Zip) {
    archiveBaseName = 'ui'
    archiveExtension = 'jar'
    destinationDirectory = file("${buildDir}/build/libs")
    from('dist')
    into('public')
}
createJar.dependsOn test

//first mybuild, than createJar
build.dependsOn "createJar"

clean.doLast {
    project.delete(files("dist"))
    project.delete(files("build"))
}

/* expose as artifact that can be used as dependency by other modules*/
configurations {
    appResources
}
configurations.default.extendsFrom(configurations.appResources)
artifacts {
    appResources(createJar.getArchiveFile()) {
        builtBy createJar
        type "jar"
    }
}

@marikaris marikaris added bug 🐛 Something isn't working triage and removed triage labels Sep 6, 2024
@marikaris
Copy link
Collaborator Author

Seems to only be the case if I first run yarn install and yarn dev in the ui folder and then do clean install in IntelliJ, if I checkout a fresh branch, it will work

@mswertz mswertz changed the title UI doesnt build anymore with gradle UI doesnt build anymore with gradle locally Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant