mirror of
git://code.qt.io/qt/qt5.git
synced 2026-05-03 17:57:40 +08:00
Android: add Gradle composite build to manage JAR projects
With a Gradle-enabled Qt build, it's easy now to manage all Qt modules' JAR builds in one place from an IDE, and that's what's being done here with Gradle composite builds. This adds each module's JAR in the qt super repo and each module also defines its potential dependencies (e.g. Qt6Android.jar). This also update .gitignore with Gradle, JDTLS and IntelliJ ignores, and moves the existing .gitignore from the provision android_gradle project to the root. Task-number: QTBUG-132915 Change-Id: I4573768c394a4c25347eeb8ce6e2ddf7e57796ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
13
.gitignore
vendored
13
.gitignore
vendored
@@ -11,3 +11,16 @@ build-*/
|
||||
init-repository.opt
|
||||
init-repository.opt.in
|
||||
config.tl.opt
|
||||
|
||||
# CLion generated files
|
||||
.idea
|
||||
|
||||
# Gradle generated files
|
||||
.gradle/
|
||||
local.properties
|
||||
|
||||
# JDTLS generated files
|
||||
.project
|
||||
.classpath
|
||||
.settings/
|
||||
bin/
|
||||
|
||||
@@ -10,7 +10,8 @@ SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GPL-3.0-only"
|
||||
[[annotations]]
|
||||
path = ["coin/**", "cmake/**", "**.pro", "**.qrc", "**CMakeLists.txt", ".cmake.conf", "**.yaml",
|
||||
"coin/axivion/ci_config_linux.json",
|
||||
"**.cfg", "**.plist", "**.pri", "**.prf", "configure.json"]
|
||||
"**.cfg", "**.plist", "**.pri", "**.prf", "configure.json",
|
||||
"settings.gradle", "gradle/libs.versions.toml"]
|
||||
precedence = "closest"
|
||||
comment = "build system"
|
||||
SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
*.iml
|
||||
.gradle
|
||||
.idea
|
||||
/local.properties
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
15
gradle.properties
Normal file
15
gradle.properties
Normal file
@@ -0,0 +1,15 @@
|
||||
# Project-wide Gradle settings.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx3200m -XX:MaxMetaspaceSize=768m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
|
||||
# Enable building projects in parallel
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Allow AndroidX usage
|
||||
android.useAndroidX=true
|
||||
|
||||
# Enable caching
|
||||
org.gradle.configuration-cache=true
|
||||
5
gradle/libs.versions.toml
Normal file
5
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[versions]
|
||||
agp = "9.0.0"
|
||||
|
||||
[plugins]
|
||||
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
49
settings.gradle
Normal file
49
settings.gradle
Normal file
@@ -0,0 +1,49 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'Qt-for-Android'
|
||||
|
||||
def tryIncludeBuild = { String path, Closure config ->
|
||||
if (new File(settingsDir, path).exists()) {
|
||||
includeBuild(path, config)
|
||||
}
|
||||
}
|
||||
|
||||
// qtbase
|
||||
tryIncludeBuild('qtbase/src/android/jar') { name = 'Qt6Android' }
|
||||
tryIncludeBuild('qtbase/src/network/android/jar') { name = 'Qt6AndroidNetwork' }
|
||||
tryIncludeBuild('qtbase/src/plugins/networkinformation/android/jar') {
|
||||
name = 'Qt6AndroidNetworkInformationBackend'
|
||||
}
|
||||
|
||||
// qtconnectivity
|
||||
tryIncludeBuild('qtconnectivity/src/android/bluetooth') { name = 'Qt6AndroidBluetooth' }
|
||||
tryIncludeBuild('qtconnectivity/src/android/nfc') { name = 'Qt6AndroidNfc' }
|
||||
|
||||
// qtdeclarative
|
||||
tryIncludeBuild('qtdeclarative/src/quick/platform/android/jar') { name = 'Qt6AndroidQuick' }
|
||||
|
||||
// qtmultimedia
|
||||
tryIncludeBuild('qtmultimedia/src/android/jar') { name = 'Qt6AndroidMultimedia' }
|
||||
|
||||
// qtpositioning
|
||||
tryIncludeBuild('qtpositioning/src/plugins/position/android/jar') { name = 'Qt6AndroidPositioning' }
|
||||
|
||||
// qtspeech
|
||||
tryIncludeBuild('qtspeech/src/plugins/tts/android/jar') { name = 'Qt6AndroidTextToSpeech' }
|
||||
|
||||
// qtwebview
|
||||
tryIncludeBuild('qtwebview/src/jar') { name = 'Qt6AndroidWebView' }
|
||||
Reference in New Issue
Block a user