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. Property of gradle.properties
QtWS25 Last Chance

Property of gradle.properties

Scheduled Pinned Locked Moved Solved Mobile and Embedded
gradleproperties
6 Posts 4 Posters 2.9k Views
  • 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.
  • M Offline
    M Offline
    Montjet
    wrote on last edited by
    #1

    Hi,
    How can I set a new property of gradle.properties in qtCreator?
    I want to set these two lines:

    android.useAndroidX=true
    android.enableJetifier=true
    
    KroMignonK 1 Reply Last reply
    1
    • M Montjet

      Hi,
      How can I set a new property of gradle.properties in qtCreator?
      I want to set these two lines:

      android.useAndroidX=true
      android.enableJetifier=true
      
      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by KroMignon
      #2

      @montjet I think you have to add those line into android/gradle/wrapper/gradle-wrapper.properties

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Montjet
        wrote on last edited by
        #3

        It looks that gradle-wrapper.properties ignores these lines of code.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Montjet
          wrote on last edited by
          #4

          I found solution.
          For someone else who will have the same problem.
          Just add this line:

          set GRADLE_OPTS=-Dorg.gradle.project.android.useAndroidX=true -Dorg.gradle.project.android.enableJetifier=true
          

          to gradlew.bat after

          set DEFAULT_JVM_OPTS=-Xmx1024m -Dfile.encoding=UTF-8
          
          1 Reply Last reply
          1
          • T Offline
            T Offline
            TripleF
            wrote on last edited by
            #5

            At least with Qt 5.15 you can just create a gradle.properties file in your Android template directory (ANDROID_PACKAGE_SOURCE_DIR). androiddeployqt will merge any properties there with its own.

            D 1 Reply Last reply
            3
            • T TripleF

              At least with Qt 5.15 you can just create a gradle.properties file in your Android template directory (ANDROID_PACKAGE_SOURCE_DIR). androiddeployqt will merge any properties there with its own.

              D Offline
              D Offline
              Distengine
              wrote on last edited by
              #6

              @TripleF Awesome, this works! Thank you

              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