Blame view

android/app/build.gradle 2.06 KB
2a29701f   liangchengyou   feat:提交代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  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"
  
  android {
156efec9   Key   修改包名,配置证书
29
30
31
32
33
      namespace "com.kouyuxingqiu.wow_english"
      // compileSdkVersion flutter.compileSdkVersion
      compileSdkVersion 33
      // 展示没有ndk需求
      // ndkVersion flutter.ndkVersion
2a29701f   liangchengyou   feat:提交代码
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  
      kotlinOptions {
          jvmTarget = '1.8'
      }
  
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  
      defaultConfig {
156efec9   Key   修改包名,配置证书
49
50
51
52
53
          applicationId "com.kouyuxingqiu.wow_english"
          //minSdkVersion flutter.minSdkVersion
          //targetSdkVersion flutter.targetSdkVersion
          minSdkVersion 23
          targetSdkVersion 33
2a29701f   liangchengyou   feat:提交代码
54
55
56
57
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
      }
  
156efec9   Key   修改包名,配置证书
58
59
60
61
62
63
64
65
66
      signingConfigs {
          release {
              storeFile file("../certificate/wow_english")
              storePassword "wow_english"
              keyAlias "wow_english"
              keyPassword "wow_english"
          }
      }
  
2a29701f   liangchengyou   feat:提交代码
67
      buildTypes {
156efec9   Key   修改包名,配置证书
68
69
70
          debug {
              signingConfig signingConfigs.release
          }
2a29701f   liangchengyou   feat:提交代码
71
          release {
156efec9   Key   修改包名,配置证书
72
              signingConfig signingConfigs.release
2a29701f   liangchengyou   feat:提交代码
73
74
75
76
77
78
79
80
81
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
2a29701f   liangchengyou   feat:提交代码
82
  }