diff options
Diffstat (limited to 'src/network/android/jar')
-rw-r--r-- | src/network/android/jar/.gitignore | 6 | ||||
-rw-r--r-- | src/network/android/jar/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/network/android/jar/build.gradle | 51 | ||||
-rw-r--r-- | src/network/android/jar/settings.gradle | 1 | ||||
-rw-r--r-- | src/network/android/jar/src/org/qtproject/qt/android/network/QtNetwork.java | 41 |
5 files changed, 67 insertions, 44 deletions
diff --git a/src/network/android/jar/.gitignore b/src/network/android/jar/.gitignore new file mode 100644 index 0000000000..364420a59a --- /dev/null +++ b/src/network/android/jar/.gitignore @@ -0,0 +1,6 @@ +.gradle/ +build/ +gradle/ +gradlew +gradlew.bat +local.properties diff --git a/src/network/android/jar/CMakeLists.txt b/src/network/android/jar/CMakeLists.txt index e8081c025b..b5172b6aba 100644 --- a/src/network/android/jar/CMakeLists.txt +++ b/src/network/android/jar/CMakeLists.txt @@ -1,17 +1,19 @@ -# Generated from jar.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause set(java_sources src/org/qtproject/qt/android/network/QtNetwork.java ) -qt_internal_add_jar(Qt${QtBase_VERSION_MAJOR}AndroidNetwork # special case +qt_internal_add_jar(Qt${QtBase_VERSION_MAJOR}AndroidNetwork INCLUDE_JARS ${QT_ANDROID_JAR} SOURCES ${java_sources} OUTPUT_DIR "${QT_BUILD_DIR}/jar" ) -install_jar(Qt${QtBase_VERSION_MAJOR}AndroidNetwork # special case - DESTINATION jar +qt_path_join(destination ${INSTALL_DATADIR} "jar") + +install_jar(Qt${QtBase_VERSION_MAJOR}AndroidNetwork + DESTINATION ${destination} COMPONENT Devel ) - diff --git a/src/network/android/jar/build.gradle b/src/network/android/jar/build.gradle new file mode 100644 index 0000000000..68a9381ad2 --- /dev/null +++ b/src/network/android/jar/build.gradle @@ -0,0 +1,51 @@ +// This is mainly used to allow Android Studio to easily read this folder as an android project. + +buildscript { + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.0.2' + } +} + +apply plugin: 'com.android.library' + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) +} + +repositories { + google() + mavenCentral() +} + +android { + compileSdk 34 + + defaultConfig { + minSdkVersion 23 + } + + sourceSets { + main { + java.srcDir 'src/' + resources.srcDir 'libs/' + manifest.srcFile 'AndroidManifest.xml' + res.srcDirs = ['res/'] + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + android { + lintOptions { + abortOnError true + } + } +} diff --git a/src/network/android/jar/settings.gradle b/src/network/android/jar/settings.gradle new file mode 100644 index 0000000000..a5d909ed33 --- /dev/null +++ b/src/network/android/jar/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "QtAndroidNetwork" diff --git a/src/network/android/jar/src/org/qtproject/qt/android/network/QtNetwork.java b/src/network/android/jar/src/org/qtproject/qt/android/network/QtNetwork.java index 8f0abf285f..eb6a16d5b7 100644 --- a/src/network/android/jar/src/org/qtproject/qt/android/network/QtNetwork.java +++ b/src/network/android/jar/src/org/qtproject/qt/android/network/QtNetwork.java @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only package org.qtproject.qt.android.network; @@ -43,7 +7,6 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.util.Log; import android.net.ConnectivityManager; import android.net.Proxy; import android.net.ProxyInfo; |