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

Distribution Path Returns Null #408

Closed
ghost opened this issue Jun 5, 2022 · 3 comments
Closed

Distribution Path Returns Null #408

ghost opened this issue Jun 5, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 5, 2022

When i try to build project, i get this error because distribution in build.gradle.kts returns null

val distribution =
                project.tasks.getByName("frontendBrowserProductionWebpack", KotlinWebpack::class).destinationDirectory

"Task with name 'frontendBrowserProductionWebpack' not found in root project"

resim

But when i change distribution value with this static one, its working fine

val distribution = "build/distributions"

resim

UPDATE
The source of the problem is that I am using the computer in Turkish language and println(project.tasks.names) returns this:

[allMetadataJar, allTests, assemble, backendJar, backendMainClasses, backendProcessResources, backendSourcesJar, backendTest, backendTestClasses, backendTestProcessResources, build, buildDependents, buildEnvironment, buildKotlinToolingMetadata, buildNeeded, check, clean, cleanAllTests, compileCommonMainKotlinMetadata, compileKotlinBackend, compileKotlinFrontend, compileKotlinMetadata, compileTestKotlinBackend, compileTestKotlinFrontend, components, dependencies, dependencyInsight, dependentComponents, frontendArchive, frontendBrowserDevelopmentRun, frontendBrowserDevelopmentWebpack, frontendBrowserDistributeResources, frontendBrowserDistribution, frontendBrowserProduct�onRun, frontendBrowserProduct�onWebpack, frontendBrowserRun, frontendBrowserTest, frontendBrowserWebpack, frontendGenerateExternals, frontendGenerateExternalsIntegrated, frontendJar, frontendMainClasses, frontendPackageJson, frontendProcessResources, frontendPublicPackageJson, frontendRun, frontendSourcesJar, frontendTest, frontendTestClasses, frontendTestPackageJson, frontendTestProcessResources, frontendTestPublicPackageJson, generateKVisionSources, generatePotFile, generateProjectStructureMetadata, help, init, javaToolchains, kotlinDslAccessorsReport, kotlinNodeJsSetup, kotlinNpmCachesSetup, kotlinNpmInstall, kotlinRestoreYarnLock, kotlinStoreYarnLock, kotlinYarnSetup, metadataCommonMainClasses, metadataJar, metadataMainClasses, metadataSourcesJar, model, nodeKotlinClean, outgoingVariants, packageJsonUmbrella, prepareKotlinBuildScriptModel, processDceDevFrontendKotlinJs, processDceFrontendKotlinJs, projects, properties, rootPackageJson, tasks, transformCommonMainDependenciesMetadata, wrapper, yarnKotlinClean]

@rjaros
Copy link
Owner

rjaros commented Jun 6, 2022

This is a problem with a Turkish language of the operating system. It's a known problem with Gradle.
See: gradle/gradle#2661 or https://discuss.gradle.org/t/locale-specific-tolowercase-and-touppercase-breaks-the-build-on-turkish-os/17840/4
The simplest workaround is to change the locale in the gradle.properties file by changing the last line to:

org.gradle.jvmargs=-Xmx2g -Duser.country=US -Duser.language=en

@ghost
Copy link
Author

ghost commented Jun 6, 2022

Thank you for your interest Robert. It's works flawlessly now!

@ghost ghost closed this as completed Jun 6, 2022
@rjaros
Copy link
Owner

rjaros commented Jun 7, 2022

There is already an old issue on Kotlin youtrack https://youtrack.jetbrains.com/issue/KT-38712

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant