summaryrefslogtreecommitdiffstats
path: root/src/android/jar/build.gradle
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2021-01-20 16:16:35 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2021-02-12 08:12:19 +0000
commit886a2d4511bdd5705595bcf4a29fb22f84c0e9aa (patch)
treecde9c37628da7d3ff7c22e0e513292bb5e1bfa66 /src/android/jar/build.gradle
parent448ea34637af3a8a92c2a4c5780815ca44e0ecf9 (diff)
Add build.gradle to easily modifying Java project with Android Studio
Pick-to: 6.0 6.1 Change-Id: Ie030ff0a3569caa0eacfa331d21f59e5455c90ed Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/android/jar/build.gradle')
-rw-r--r--src/android/jar/build.gradle54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/android/jar/build.gradle b/src/android/jar/build.gradle
new file mode 100644
index 0000000000..f2dcb500ca
--- /dev/null
+++ b/src/android/jar/build.gradle
@@ -0,0 +1,54 @@
+// This is mainly used to allow Android Studio to easily read this folder as an android project.
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:4.0.2'
+ }
+}
+
+apply plugin: 'com.android.library'
+
+dependencies {
+ implementation fileTree(dir: "libs", include: ["*.jar"])
+// implementation 'androidx.appcompat:appcompat:1.2.0' // for androidx
+}
+
+repositories {
+ google()
+ jcenter()
+}
+
+android {
+ compileSdkVersion 30
+ buildToolsVersion "30.0.3"
+
+ defaultConfig {
+ minSdkVersion 23
+ targetSdkVersion 30
+ }
+
+ 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
+ }
+ }
+}