// Gradle init script for the Android APK build, installed as // ~/.gradle/init.d/cst-android.gradle by scripts/build_apk_android.sh. // // Qt's generated gradle project only sets "lintOptions { abortOnError false }", // so the release build still runs lintVitalAnalyzeRelease -- and that task // resolves its own tool jars (manifest-merger, lint-typedef-remover, ...) // straight from dl.google.com, bypassing every repository the project (or an // init script) configures. On a slow or filtered route that fails the build // after all the real work is done, and nothing here wants lint output anyway. gradle.afterProject { project -> def android = project.extensions.findByName('android') if (android != null) { // AGP keeps both spellings around: lintOptions (deprecated) and lint. try { android.lintOptions.checkReleaseBuilds = false } catch (Exception ignored) { } try { android.lint.checkReleaseBuilds = false } catch (Exception ignored) { } // NOTE: no signing config here on purpose. androiddeployqt copies the // *unsigned* gradle output and signs it itself (--sign); a signed // gradle APK makes it fail with "Could not copy unsigned APK". The // keystore is wired up from app/CMakeLists.txt through // QT_ANDROID_SIGN_APK + the QT_ANDROID_KEYSTORE_* environment. } // Belt and braces: switch the tasks themselves off. project.tasks.matching { it.name.startsWith('lintVital') }.configureEach { it.enabled = false } }