Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to manipulate build.gradle through androiddeployqt.exe?
Qt 6.11 is out! See what's new in the release blog

How to manipulate build.gradle through androiddeployqt.exe?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 3 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • HoratioH Offline
    HoratioH Offline
    Horatio
    wrote on last edited by
    #1

    In my project, we are using androiddeployqt.exe to create the Android application with command lines.
    And we use Gradle (--gradle).

    The file, "build.gradle", is generated by androiddeployqt.exe automatically.
    How do I add something to it?
    How to I put my own stuffs into it, in the final generated build.gradle?
    Does androiddeployqt.exe take some inputs for that?

    I know I can have my own gradle.properties because androiddeployqt.exe will merge the properties for me.

    jsulmJ raven-worxR 2 Replies Last reply
    0
    • HoratioH Horatio

      In my project, we are using androiddeployqt.exe to create the Android application with command lines.
      And we use Gradle (--gradle).

      The file, "build.gradle", is generated by androiddeployqt.exe automatically.
      How do I add something to it?
      How to I put my own stuffs into it, in the final generated build.gradle?
      Does androiddeployqt.exe take some inputs for that?

      I know I can have my own gradle.properties because androiddeployqt.exe will merge the properties for me.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Horatio said in How to manipulate build.gradle through androiddeployqt.exe?:

      androiddeployqt.exe

      I never used it, but did you try to call it with -h or --help parameter? Did you read http://doc.qt.io/qt-5/deployment-android.html ?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • HoratioH Horatio

        In my project, we are using androiddeployqt.exe to create the Android application with command lines.
        And we use Gradle (--gradle).

        The file, "build.gradle", is generated by androiddeployqt.exe automatically.
        How do I add something to it?
        How to I put my own stuffs into it, in the final generated build.gradle?
        Does androiddeployqt.exe take some inputs for that?

        I know I can have my own gradle.properties because androiddeployqt.exe will merge the properties for me.

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Horatio
        it's only created upon first run no? (At least in QtCreator - i don't know the exact workflow though)
        Once it is created you can add modify it to your needs.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • HoratioH Offline
          HoratioH Offline
          Horatio
          wrote on last edited by
          #4

          The "build.gradle" is created only when there is no existing one.
          And, it is created from the template: Src\qtbase\src\android\templates\build.gradle.

          Besides owning a build.gradle in my project, the other workaround is to read content from the template, add my own stuffs, and then write to a new 'build.gradle' before calling androiddeployqt.exe.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved