You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

111 lines
3.0 KiB

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def mfph = [
//宿主包名
"apk.applicationId" : "com.zsw.huixiang",
]
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main{
jniLibs.srcDirs = ['libs']
}
}
defaultConfig {
applicationId "com.zsw.huixiang"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
manifestPlaceholders = mfph
}
signingConfigs {
config {
keyAlias 'huixiang'
keyPassword 'huixiang'
storeFile file('huixiang.jks')
storePassword 'huixiang'
v1SigningEnabled true //兼容v1
v2SigningEnabled true //兼容v2
}
debug {//debug版签名配置
keyAlias 'huixiang'
keyPassword 'huixiang'
storeFile file('huixiang.jks')
storePassword 'huixiang'
v1SigningEnabled true //兼容v1
v2SigningEnabled true //兼容v2
}
}
buildTypes {
release {
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
profile {
signingConfig signingConfigs.config
}
}
aaptOptions {
additionalParameters '--auto-add-overlay'
ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
}
}
flutter {
source '../..'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation "com.facebook.fresco:animated-gif:1.13.0"
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.alibaba:fastjson:1.2.54'
}