Skip to content

Commit c6c8586

Browse files
authored
Update build.gradle.kts
1 parent 85f560a commit c6c8586

File tree

1 file changed

+52
-36
lines changed

1 file changed

+52
-36
lines changed

build.gradle.kts

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,57 @@
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
64

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"
1111

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"
2313

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
3256
}
33-
}
34-
35-
tasks.withType<JavaCompile>() {
36-
options.encoding = "UTF-8"
37-
}
38-
39-
tasks.withType<Javadoc>() {
40-
options.encoding = "UTF-8"
4157
}

0 commit comments

Comments
 (0)