Add build.gradle to easily modifying Java project with Android Studio
Change-Id: Ie030ff0a3569caa0eacfa331d21f59e5455c90ed Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 886a2d4511bdd5705595bcf4a29fb22f84c0e9aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ea8a0eb417
commit
f94fbaf80a
6
src/android/jar/.gitignore
vendored
Normal file
6
src/android/jar/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.gradle/
|
||||||
|
build/
|
||||||
|
gradle/
|
||||||
|
gradlew
|
||||||
|
gradlew.bat
|
||||||
|
local.properties
|
@ -1,5 +1,4 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="org.qtproject.qt.android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="org.qtproject.qt.android">
|
||||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||||
<uses-sdk android:minSdkVersion="9" />
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
54
src/android/jar/build.gradle
Normal file
54
src/android/jar/build.gradle
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
src/android/jar/settings.gradle
Normal file
1
src/android/jar/settings.gradle
Normal file
@ -0,0 +1 @@
|
|||||||
|
rootProject.name = "QtAndroid"
|
Loading…
x
Reference in New Issue
Block a user