Files
a3a52f18df refactor(driver): refactor runtime (#3200)
* feat(driver): refactor runtime

* feat(driver): remove redundant code

* feat(ios): add inspectable for ios

* feat(voltron): compat vm opt for voltron android

* fix(voltron): fix conflict to v3.0-dev

* fix(driver): fix code conflicts

* fix(voltron): delete swift plugin file

* fix(voltron): fix ios vm compile error

---------

Co-authored-by: luomy <ozonelmy@163.com>
Co-authored-by: lvfen <284437334@qq.com>
Co-authored-by: OpenHippy <124017524+open-hippy@users.noreply.github.com>
2023-05-11 10:13:59 +00:00

136 lines
3.0 KiB
Groovy

group 'com.tencent.flutter_render'
version '1.0-SNAPSHOT'
buildscript {
ext {
kotlin_version = '1.6.20'
THIRD_PARTY_LIBRARY_PATH = "$projectDir.absolutePath/src/main/jni/third_party"
JNI_LIBRARY_PATH = "$projectDir.absolutePath/libs"
// 默认不编译C++代码,可以加快编译速度和调试速度(默认关闭LLVM调试器)
// 如果需要本地调试/修改C++代码,打开这个即可
enableLocalCmake = true
if (!enableLocalCmake) {
def enable = System.getenv("ENABLE_LOCAL_CMAKE")
println("system env enable local cmake:$enable")
if (enable == "true") {
println("system env enable local cmake inner:$enable")
enableLocalCmake = false
} else {
// 系统环境里面没有从local.properties里面取
def dir = System.getProperty("user.dir")
def file = new File(dir, 'local.properties')
Properties properties = new Properties()
if (file.exists()) {
properties.load(file.newDataInputStream())
enableLocalCmake = Boolean.valueOf(properties.getProperty('enableLocalCmake', "false"))
}
}
}
println("enable local cmake:$enableLocalCmake")
}
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.novoda:bintray-release:0.9.2'
}
}
rootProject.allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 32
publishNonDefault true
ndkVersion = NDK_VERSION
defaultConfig {
minSdkVersion 21
consumerProguardFiles "proguard-rules.pro"
if (enableLocalCmake) {
externalNativeBuild {
cmake {
cppFlags "-std=c++17"
arguments "-DJS_ENGINE=V8",
"-DANDROID_CPP_FEATURES=no-rtti no-exceptions",
"-DANDROID_PLATFORM=android-21",
"-DANDROID_STL=$ANDROID_STL",
"-DV8_COMPONENT=$V8_COMPONENT",
"-DENABLE_INSPECTOR=$ENABLE_INSPECTOR",
"-DHIDDEN_LIBRARY_SYMBOL=$HIDDEN_LIBRARY_SYMBOL"
}
}
}
}
buildTypes {
profile {
minifyEnabled false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
jniDebuggable true
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main {
if (!enableLocalCmake) {
jniLibs.srcDirs = ['libs']
}
}
}
if (enableLocalCmake) {
externalNativeBuild {
cmake {
version CMAKE_VERSION
path "../core/CMakeLists.txt"
}
}
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}