Android: Update and add missing gradle files for jar folders
Update the build.gradle for main Qt jar code, and add same files for network and network information backend, so the code can be managed from Android Studio. This also adds .gitignore to ignore Android Studio build artefacts. Pick-to: 6.2 Change-Id: Ic06e9d12708070fad112f17e58b8754608d184f3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
3dbca82f86
commit
b02d88e416
@ -3,11 +3,11 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,21 +15,20 @@ apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
// implementation 'androidx.appcompat:appcompat:1.2.0' // for androidx
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "31.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
6
src/network/android/jar/.gitignore
vendored
Normal file
6
src/network/android/jar/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
.gradle/
|
||||
build/
|
||||
gradle/
|
||||
gradlew
|
||||
gradlew.bat
|
||||
local.properties
|
53
src/network/android/jar/build.gradle
Normal file
53
src/network/android/jar/build.gradle
Normal file
@ -0,0 +1,53 @@
|
||||
// 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:7.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "31.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 31
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
1
src/network/android/jar/settings.gradle
Normal file
1
src/network/android/jar/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = "QtAndroidNetwork"
|
6
src/plugins/networkinformation/android/jar/.gitignore
vendored
Normal file
6
src/plugins/networkinformation/android/jar/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
.gradle/
|
||||
build/
|
||||
gradle/
|
||||
gradlew
|
||||
gradlew.bat
|
||||
local.properties
|
53
src/plugins/networkinformation/android/jar/build.gradle
Normal file
53
src/plugins/networkinformation/android/jar/build.gradle
Normal file
@ -0,0 +1,53 @@
|
||||
// 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:7.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "31.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 31
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
rootProject.name = "QtAndroidNetworkInformationBackend"
|
Loading…
x
Reference in New Issue
Block a user