|
1 | | -/* |
2 | | - * This file was generated by the Gradle 'init' task. |
3 | | - * |
4 | | - * This project uses @Incubating APIs which are subject to change. |
5 | | - */ |
| 1 | +android { |
| 2 | + namespace 'com.name' |
| 3 | + compileSdk 34 |
6 | 4 |
|
7 | | -plugins { |
8 | | - `java-library` |
9 | | - `maven-publish` |
10 | | -} |
| 5 | + defaultConfig { |
| 6 | + applicationId "com.name" |
| 7 | + minSdk 29 |
| 8 | + targetSdk 34 |
| 9 | + versionCode 1 |
| 10 | + versionName "1.0" |
11 | 11 |
|
12 | | -repositories { |
13 | | - mavenLocal() |
14 | | - maven { |
15 | | - url = uri("https://repo.maven.apache.org/maven2/") |
16 | | - } |
17 | | -} |
18 | | - |
19 | | -dependencies { |
20 | | - api(libs.org.springframework.boot.spring.boot.starter.web) |
21 | | - testImplementation(libs.org.springframework.boot.spring.boot.starter.test) |
22 | | -} |
| 12 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
23 | 13 |
|
24 | | -group = "com.example" |
25 | | -version = "0.0.1-SNAPSHOT" |
26 | | -description = "demo" |
27 | | -java.sourceCompatibility = JavaVersion.VERSION_17 |
28 | | - |
29 | | -publishing { |
30 | | - publications.create<MavenPublication>("maven") { |
31 | | - from(components["java"]) |
| 14 | + externalNativeBuild { |
| 15 | + cmake { |
| 16 | + arguments "-DOPENCV_VERSION_MAJOR=4", "-DOPENCV_FROM_SDK=FALSE", "-DANDROID_STL=c++_shared" |
| 17 | + targets "native_lib" |
| 18 | + } |
| 19 | + } |
| 20 | + } |
| 21 | + ktlint { |
| 22 | + android = true |
| 23 | + ignoreFailures = false |
| 24 | + disabledRules = ["wildcard-imports", "no-wildcard-imports"] |
| 25 | + reporters { |
| 26 | + reporter "plain" |
| 27 | + reporter "checkstyle" |
| 28 | + //reporter "sarif" |
| 29 | + //reporter "html" |
| 30 | + } |
| 31 | + } |
| 32 | + buildTypes { |
| 33 | + release { |
| 34 | + minifyEnabled false |
| 35 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 36 | + } |
| 37 | + } |
| 38 | + compileOptions { |
| 39 | + sourceCompatibility JavaVersion.VERSION_17 |
| 40 | + targetCompatibility JavaVersion.VERSION_17 |
| 41 | + } |
| 42 | + composeOptions { |
| 43 | + kotlinCompilerExtensionVersion '1.5.1' |
| 44 | + } |
| 45 | + packagingOptions { |
| 46 | + exclude 'META-INF/DEPENDENCIES' |
| 47 | + } |
| 48 | + externalNativeBuild { |
| 49 | + cmake { |
| 50 | + path 'src/main/cpp/CMakeLists.txt' |
| 51 | + } |
| 52 | + } |
| 53 | + buildFeatures { |
| 54 | + compose true |
| 55 | + prefab true // Enable prefab for OpenCV |
32 | 56 | } |
33 | | -} |
34 | | - |
35 | | -tasks.withType<JavaCompile>() { |
36 | | - options.encoding = "UTF-8" |
37 | | -} |
38 | | - |
39 | | -tasks.withType<Javadoc>() { |
40 | | - options.encoding = "UTF-8" |
41 | 57 | } |
0 commit comments