12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- def localProperties = new Properties()
- def localPropertiesFile = rootProject.file('local.properties')
- if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
- }
- def keystoreProperties = new Properties()
- def keystorePropertiesFile = rootProject.file('key.properties')
- if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- }
- 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 {
- namespace "com.compdfkit.flutter.example"
- compileSdkVersion flutter.compileSdkVersion
- ndkVersion flutter.ndkVersion
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- signingConfigs {
- release {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
- storePassword keystoreProperties['storePassword']
- }
- }
- defaultConfig {
- applicationId "com.compdfkit.flutter.example"
- minSdkVersion 21
- targetSdkVersion flutter.targetSdkVersion
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- }
- buildTypes {
- release {
- minifyEnabled false
- shrinkResources false
- signingConfig signingConfigs.release
- }
- }
- packagingOptions {
- pickFirst 'lib/x86_64/libapp.so'
- pickFirst 'lib/armeabi-v7a/libapp.so'
- pickFirst 'lib/arm64-v8a/libapp.so'
- }
- }
- flutter {
- source '../..'
- }
- dependencies {
- api fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- api 'com.compdf:compdfkit:1.9.1'
- api 'com.compdf:compdfkit-ui:1.9.1'
- api 'com.compdf:compdfkit-tools:1.9.1'
- }
|