https://gradle.com/ logo
Docs
Join the conversationJoin Slack
Channels
android
caching
community-news
community-support
config-avoidance
configuration-cache
contributing
dependabot
dependency-management
design
design-specs
developer-productivity-engineering
docs
dpe-summit
feed
file-system-watching
flutter
general
gradle-enterprise
jobs
kotlin-dsl
linen
maven
migrating-from-ant
migrating-from-maven
native
performance
playframework
plugin-development
releases
roadmap
self-promotion
Powered by Linen
native
  • p

    Peter Ehikhuemen

    02/25/2022, 5:28 PM
    An exception occurred applying plugin request [id: 'dev.nokee.c-library', artifact: 'dev.nokee.c-library:dev.nokee.c-library.gradle.plugin:0.5.0-930919a0']
    > Failed to apply plugin 'dev.nokee.c-library'.
       > Could not create an instance of type dev.nokee.platform.nativebase.internal.dependencies.DefaultNativeLibraryComponentDependencies.
          > Cannot reuse existing configuration named 'compileOnly' as a declarable bucket of dependencies because it does not match the expected configuration (expecting: [canBeConsumed: false, canBeResolved: false], actual: [canBeConsumed: false, canBeResolved: true]).
    d
    • 2
    • 50
  • g

    Giuseppe Barbieri

    04/18/2022, 2:17 PM
    I'd like to execute native compilation with Gradle, but I'm not familiar with native code and even less with Gradle and Native..
    d
    • 2
    • 7
  • g

    Giuseppe Barbieri

    04/19/2022, 10:57 AM
    how can I simply just compile plain
    c
    files if I want to do manual but within Gradle? Like setting sources, header and flags?
    d
    • 2
    • 12
  • t

    thadhouse

    04/26/2022, 4:09 AM
    Does nokee support cross compilation yet? I haven't looked in a while. It seems like its gaining a lot more, and maybe enough to allow me to start looking at it instead of the software model code I'm using.
    d
    • 2
    • 1
  • m

    Mouna

    04/27/2022, 9:02 AM
    Hello everyone !! I am new to gradle, can someone provide me with a link or tutorial i can use I'm trying to build a c++ app with gradle, and previously the app was built with msbuild Thanks in advance.
    d
    • 2
    • 3
  • p

    Pradeep

    05/01/2022, 2:29 AM
    I am using jni with QT . I have this issue https://github.com/nokeedev/gradle-native/issues/605 How can I solve this error ?
    d
    • 2
    • 4
  • i

    iTrooz_

    05/03/2022, 8:13 AM
    Hello, does anyone knows how I can add a shared library as a dependency to my project ? I have a .so file, and I'd like to do something like
    implementation files("libTest.so")
    I use nokee plugins, more specifically dev.nokee.c-application
    d
    • 2
    • 1
  • e

    Erik Schilling

    05/09/2022, 1:03 PM
    Hi, I hunt a bug in our build system which deletes a .so file. I drilled it down to this stack trace:
    unlink0:-1, UnixNativeDispatcher (sun.nio.fs)
    unlink:132, UnixNativeDispatcher (sun.nio.fs)
    implDelete:235, UnixFileSystemProvider (sun.nio.fs)
    deleteIfExists:110, AbstractFileSystemProvider (sun.nio.fs)
    deleteIfExists:1191, Files (java.nio.file)
    hardLinkOrCopy:457, CxxRegularBuilderKt (com.android.build.gradle.internal.cxx.build)
    build:209, CxxRegularBuilder (com.android.build.gradle.internal.cxx.build)
    Where do I find the CxxRegularBuilderKt / CxxRegularBuilder classes? I feel a bit stupid, but searching the gradle code, full github or Google does not give me any hint... I assume this is from a plugin, but where do I find the source to it? 🤔
    e
    • 2
    • 7
  • p

    Pradeep

    05/27/2022, 3:59 AM
    I have an issue with QT. https://stackoverflow.com/questions/72386182/qt-installer-worked-coding-not-give-result How can I solve this problem?
    d
    • 2
    • 1
  • t

    thadhouse

    06/05/2022, 10:30 PM
    Is there a way to hide tasks for non buildable binaries from being shown when running
    tasks
    ? We have a bunch where we disable the static or shared binary instance by setting buildable to false, but the tasks still show up, and some users try to build them, which fails.
    d
    • 2
    • 2
  • t

    thadhouse

    06/13/2022, 8:33 PM
    Daniel I just wanted to see if it is possible to feature request something for nokee. Add a way to include args both before and after the libraries, object files, and source files are added to a link or compile task. Just ran into a case where a customer need an arg before the link libraries. Turns out in the current gradle built in plugins, there is no way to do this. To make it more annoying, GCC and MSVC are different. MSVC puts args before link libraries, gcc puts them after. https://github.com/gradle/gradle/blob/master/subprojects/platform-native/src/main/[…]dle/nativeplatform/toolchain/internal/msvcpp/LinkExeLinker.java https://github.com/gradle/gradle/blob/master/subprojects/platform-native/src/main/[…]org/gradle/nativeplatform/toolchain/internal/gcc/GccLinker.java If I could access systemArgs I could make it work, but that is fully inaccessable.
    d
    • 2
    • 11
  • u

    Umang chopra

    06/22/2022, 5:37 AM
    https://stackoverflow.com/questions/72710095/i-am-new-in-native-script-and-trying-to-run-the-android-app-using-cmd-but-gettin
    Execution_failed_for_task___verifyReleaseResources__
    d
    • 2
    • 1
  • m

    Marcell Győrik

    07/22/2022, 2:21 PM
    Hello, I'm currently building a java application using the nokee.jni-library plugin. My only problem is that on the C side, I would like to use the openCV library. Looking trough the documentation and the github issues, I could not find a soultion to link the libraries of OpenCV with my own source code. The code was working before that, but now I get a 'symbol lookup error: .... undefined symbol:..' error when launching my app. Does someone have experience with these kind of issues? I'm using a soultion shown in one of the sampels. The Java application is in a top gradle project, and it includes a nativeLib gradle project, which uses the 'dev.nokee.jni-library' and 'dev.nokee.cpp-language' plugins. Best Regards, Marcell
    d
    • 2
    • 8
  • m

    Martmists

    07/25/2022, 2:26 AM
    How do I specify a custom GCC toolchain to be used? (devkita64 in my case) I tried configuring it with this code but it seems to still compile for x86:
    library {
        toolChains {
            configureEach {  // I also tried `val devkitA64 by creating(Gcc::class)` but it complained it wasn't able to make it
                if (this is Gcc) {
                    target("nx") {
                        platform.architecture("aarch64")
                        cppCompiler.executable = binary("aarch64-none-elf-g++")
                        cppCompiler.withArguments {
                            addAll(CPPFLAGS.split(' '))
                        }
                        assembler.executable = binary("aarch64-none-elf-as")
                        assembler.withArguments {
                            addAll(ASMFLAGS.split(' '))
                        }
                        linker.executable = binary("aarch64-none-elf-ld")
                        linker.withArguments {
                            addAll(CFLAGS.split(' '))
                        }
                        staticLibArchiver.executable = binary("aarch64-none-elf-ar")
                    }
                }
            }
        }
    d
    • 2
    • 4
  • m

    Martmists

    07/25/2022, 8:40 AM
    nvm, looks like gradle doesn't support cross-compiling yet, I'll look into cmake instead
  • m

    Marcell Győrik

    07/29/2022, 10:50 AM
    Hello, I'm currently developing a java application with nokee's jni-library plugin, but the development is quite hard without the advanced IDE features like autocomplete. On the C++ side of things I get absolutely no help from the IDE. I'm using IntelliJ Ultimate, but willing to change if I can get the code complition working. In C++ i'm also using some external libraries. I saw that there is a XCode plugin to help with development, but afaik XCode is only available on Mac. Any suggestion is welcome.
    d
    • 2
    • 5
  • e

    Eivind Naess

    08/05/2022, 7:21 PM
    Hello, I was just doing some research on Gradle and building native applications using it (not using nokee yet), then I discovered that building native applications on Windows is having issues. Apparently, according to gradle-native issue 618, I am not the only one who have discovered this with a more recent visual studio toolchain. What's the current status of gradle-native now, is bugs being fixed and is there still development being done here? Doesn't seem like much has changed w.r.t. the original cpp-application / cpp-library plugins other than a few compiler warnings b/c the api changed slightly. Given that issue 618 was filed almost 3 years ago and nobody have fixed it yet is very concerning to me. https://github.com/gradle/gradle-native/issues/618
    d
    • 2
    • 4
  • e

    Eivind Naess

    08/05/2022, 7:23 PM
    I've briefly looked at the Nokee documentation, and I can't seem to find the information I am interested in. Links broken, etc.
  • k

    Kapilarny YT

    08/31/2022, 12:21 AM
    Hi, I have a little question, how can i link a static library to a jni-library-project with cpp-language?
  • k

    Kapilarny YT

    08/31/2022, 1:15 PM
    Nevermind got it working 😄
  • a

    anita

    09/21/2022, 9:14 PM
    Is there a way to generate a compile_commands.json using gradle native?
    d
    • 2
    • 1
  • b

    Basil Mathew

    09/27/2022, 6:03 PM
    Hello Everyone I am new to this forum, very new to Gradle and also a relative beginner in Software Engineering in general. Also, I do not have any experience of working previously with Groovy/Kotlin. So please excuse and correct me if my questions are basic and/or does not make any sense, I have been asked to create a POC to migrate our embedded system build for native C project from the Make/SCons world to the Gradle world in our organization. I have been going through the Gradle documentation (what is available) and the questions in this slack channel for the last 2 days. My current state is one of extreme confusion as I do not seem to get the overall picture of how the support for the native C SW projects is provided in Gradle; Should probably be due to my in-experience and lack of knowledge... All I wanted to do as a first step is to compile a set of C-files, create a library out of the sub-set of the previously compiled C-files and link the library and the other object files to an executable using TASKING compiler for TRICORE target. To start with, I am confused regarding different approaches to native SW project builds, namely - Using the latest cpp-application, cpp-library plugins - Old Native build - Nokee Plugin What I have read so far is that one should use the latest plugins when starting newly to configure a native project, but I see some configurations are still reused from old native build. Also what is confusing is whether to use Nokee or cpp-application, cpp-library plugins; what is the difference? Secondly, configuring the Gradle to work with TASKING compiler for TRICORE target seems to be complicated. I have read about toolchains, target platform and such, but I am not sure if I have understood this properly. Things in the Make/SCons world is much simpler, one just configures the command line to be executed with the appropriate arguments and things just work. Is there an example that I can have a look? I understand that I could probable be asking a very broad question and/or a basic one, but any help regarding where to start and how to proceed will be very helpful for me. Thank you
    d
    • 2
    • 15
  • t

    thadhouse

    11/03/2022, 6:38 AM
    I finally figured out how to get rid of the big fragile use of internal code we have in our native plugins. We used to instantiate our own copy of AbstractGccCompatibleToolchain, with having to grab all the weird constructor parameters it needed. But I figured out how to just use the stock registered GccToolChain instance. We still need the internal version of the ToolchainRegistry, but I'm much less worried about that interface breaking. I wonder if this gets me close enough to where I could actually try Nokee. As long as it doesn't bail when the target is arm, it should actually work.
    d
    • 2
    • 2
  • j

    Jendrik Johannes

    12/06/2022, 10:59 AM
    If anyone knows if there is a specific reason why certain tasks for native development in Gradle core (Assemble, LinkExecutable, CreateStaticLibrary) are not cacheable, I would be happy to hear about that. I created this PR: https://github.com/gradle/gradle/pull/22993
  • t

    thadhouse

    12/09/2022, 9:39 PM
    https://github.com/gradle/gradle/pull/21780 What can we do to push this along? It just keeps getting pushed back for no reason. Its a simple change.
    d
    • 2
    • 1
Powered by Linen
Title
t

thadhouse

12/09/2022, 9:39 PM
https://github.com/gradle/gradle/pull/21780 What can we do to push this along? It just keeps getting pushed back for no reason. Its a simple change.
d

daniel

12/12/2022, 9:28 AM
I don’t see a reason that it can’t be merged, but if you want things to move a bit faster, we can look into writing the support in Nokee. For use, toolchain support should be “implementation agnostic” which means whatever Nokee will do to support native toolchain, we want make sure they aren’t tied to Nokee plugins but can be used in other scenarios that would requires finding and using native toolchains. Our basic idea is to go through the dependency engine which would solve 95% of all cases. To support software model toolchain declaration, it would be just a matter of adding a shim that resolve from dependency engine and present them into a compatible model. We can work together on detailing this work if you want.
View count: 5