mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-30 21:13:28 +01:00 
			
		
		
		
	Made required changes according to https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply
This commit is contained in:
		| @@ -1,3 +1,9 @@ | ||||
| plugins { | ||||
|     id "com.android.application" | ||||
|     id "kotlin-android" | ||||
|     id "dev.flutter.flutter-gradle-plugin" | ||||
| } | ||||
|  | ||||
| def localProperties = new Properties() | ||||
| def localPropertiesFile = rootProject.file('local.properties') | ||||
| if (localPropertiesFile.exists()) { | ||||
| @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| 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' | ||||
| @@ -21,11 +22,6 @@ if (flutterVersionName == null) { | ||||
|     flutterVersionName = '1.0' | ||||
| } | ||||
|  | ||||
| apply plugin: 'com.android.application' | ||||
| apply plugin: 'kotlin-android' | ||||
| apply plugin: 'dev.rikka.tools.refine' | ||||
| apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||||
|  | ||||
| def keystoreProperties = new Properties() | ||||
| def keystorePropertiesFile = rootProject.file('key.properties') | ||||
| if (keystorePropertiesFile.exists()) { | ||||
| @@ -33,7 +29,8 @@ if (keystorePropertiesFile.exists()) { | ||||
| } | ||||
|  | ||||
| android { | ||||
|     compileSdkVersion rootProject.ext.compileSdkVersion | ||||
|     namespace "dev.imranr.obtainium" | ||||
|     compileSdk flutter.compileSdkVersion | ||||
|     ndkVersion flutter.ndkVersion | ||||
|  | ||||
|     compileOptions { | ||||
| @@ -54,7 +51,7 @@ android { | ||||
|         // You can update the following values to match your application needs. | ||||
|         // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. | ||||
|         minSdkVersion 24 | ||||
|         targetSdkVersion rootProject.ext.targetSdkVersion | ||||
|         targetSdkVersion flutter.targetSdkVersion | ||||
|         versionCode flutterVersionCode.toInteger() | ||||
|         versionName flutterVersionName | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user