-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dd638c
commit a5988a7
Showing
3 changed files
with
39 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,62 @@ | ||
plugins { | ||
id "com.android.application" | ||
id "kotlin-android" | ||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. | ||
id "dev.flutter.flutter-gradle-plugin" | ||
} | ||
|
||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
def localPropertiesFile = rootProject.file("local.properties") | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
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" | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
||
buildscript { | ||
ext.kotlin_version = '1.7.10' // Set Kotlin version here | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
def flutterVersionName = localProperties.getProperty("flutter.versionName") | ||
if (flutterVersionName == null) { | ||
flutterVersionName = "1.0" | ||
} | ||
|
||
android { | ||
compileSdkVersion 33 | ||
applicationId "co.paystack.flutterpaystack" | ||
compileSdk = 34 | ||
ndkVersion = flutter.ndkVersion | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
|
||
lint { | ||
disable 'InvalidPackage' // Use `lint` if your Gradle version supports it | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
defaultConfig { | ||
applicationId "co.paystack.flutterpaystack" | ||
minSdkVersion 16 | ||
targetSdkVersion 33 | ||
versionCode 1 | ||
versionName "1.0" | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId = "com.softdelaxe.rent24" | ||
// You can update the following values to match your application needs. | ||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. | ||
minSdk = 16 | ||
targetSdk = 34 | ||
versionCode = flutterVersionCode.toInteger() | ||
versionName = flutterVersionName | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.debug | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig = signingConfigs.debug | ||
} | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "1.8" // Set to "17" if using Java 17 | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed | ||
targetCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed | ||
} | ||
} | ||
|
||
|
||
flutter { | ||
source '../..' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters