9
android/.gitignore
vendored
Normal file
9
android/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.cxx
|
70
android/build.gradle
Normal file
70
android/build.gradle
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (c) 田梓萱[小草林] 2021-2024.
|
||||
* All Rights Reserved.
|
||||
* All codes are protected by China's regulations on the protection of computer software, and infringement must be investigated.
|
||||
* 版权所有 (c) 田梓萱[小草林] 2021-2024.
|
||||
* 所有代码均受中国《计算机软件保护条例》保护,侵权必究.
|
||||
*/
|
||||
|
||||
// The Android Gradle Plugin builds the native code with the Android NDK.
|
||||
|
||||
group 'com.devac.whisper_flutter'
|
||||
version '1.0'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// The Android Gradle Plugin knows how to build native code with the NDK.
|
||||
classpath 'com.android.tools.build:gradle:8.4.2'
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
if (project.android.hasProperty("namespace")) {
|
||||
namespace "com.devac.whisper_flutter_new"
|
||||
}
|
||||
ndkVersion "27.0.11902837"
|
||||
|
||||
compileSdk 34
|
||||
|
||||
// Invoke the shared CMake build with the Android Gradle Plugin.
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "../src/CMakeLists.txt"
|
||||
version "3.22.1"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
ndk {
|
||||
// Flutter does not currently support building for x86 Android (See Issue 9253).
|
||||
abiFilters("armeabi-v7a", "x86_64", "arm64-v8a", "x86")
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cFlags "-O3 -s -flto=thin -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
cppFlags "-O3 -s -flto=thin -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
arguments "-Wl,--gc-sections,--exclude-libs,ALL", "-DANDROID_STL=c++_static", "-DCMAKE_BUILD_TYPE=Release"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
31
android/gradle.properties
Normal file
31
android/gradle.properties
Normal file
@@ -0,0 +1,31 @@
|
||||
org.gradle.jvmargs=-Xmx10g -Xss1024k -XX:ParallelGCThreads=8 -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=5g -Dkotlin.daemon.jvm.options\="-Xmx10g"
|
||||
org.gradle.parallel=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.caching=true
|
||||
systemProp.https.protocols=TLSv1.3,TLSv1.2,TLSv1.1
|
||||
systemProp.jdk.tls.client.protocols=TLSv1.3,TLSv1.2,TLSv1.1
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.nonTransitiveRClass=true
|
||||
android.suppressUnsupportedCompileSdk=UpsideDownCake
|
||||
android.debug.obsoleteApi=false
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
kotlin.build.report.output=file
|
||||
vcsInfo.include=true
|
||||
# android.enableVcsInfo=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
# Enable R8 full mode.
|
||||
android.enableR8.fullMode=true
|
||||
# Only for Debug
|
||||
android.injected.testOnly=false
|
||||
#kotlin incremental
|
||||
kotlin.incremental=true
|
||||
kotlin.incremental.java=true
|
||||
kotlin.caching.enabled=true
|
||||
#MPP
|
||||
kotlin.mpp.enableCInteropCommonization=true
|
||||
kotlin.mpp.androidSourceSetLayoutVersion=2
|
||||
firebasePerformanceInstrumentationEnabled=true
|
7
android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
1
android/settings.gradle
Normal file
1
android/settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
rootProject.name = 'whisper_flutter_new'
|
3
android/src/main/AndroidManifest.xml
Normal file
3
android/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.devac.whisper_flutter_new">
|
||||
</manifest>
|
Reference in New Issue
Block a user