Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
chore: update gradle android plugin to 8.7.0 and gradle to 8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
luifr10 committed Jan 2, 2025
1 parent 4780465 commit b193c35
Show file tree
Hide file tree
Showing 14 changed files with 286 additions and 85 deletions.
1 change: 0 additions & 1 deletion android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ gradle-wrapper.jar
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
Expand Down
9 changes: 4 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if (flutterVersionName == null) {

android {
namespace "com.panoramax.app"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileSdk localProperties.getProperty('flutter.compileSdkVersion').toInteger()
ndkVersion localProperties.getProperty('flutter.ndkVersion')

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand All @@ -41,12 +41,11 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.panoramax.app"
// 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 21
targetSdk flutter.targetSdkVersion
minSdk localProperties.getProperty('flutter.minSdkVersion').toInteger()
targetSdk localProperties.getProperty('flutter.targetSdkVersion').toInteger()
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
26 changes: 26 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

buildscript {
ext.kotlin_version = '1.9.0'
repositories {
Expand All @@ -21,6 +29,24 @@ rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android.compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger()
project.android.defaultConfig.targetSdkVersion = localProperties.getProperty('flutter.targetSdkVersion').toInteger()
project.android.compileOptions.sourceCompatibility = JavaVersion.VERSION_17
project.android.compileOptions.targetCompatibility = JavaVersion.VERSION_17
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
}
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
subprojects {
project.evaluationDependsOn(':app')
}
Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
7 changes: 7 additions & 0 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
flutter.compileSdkVersion=35
flutter.minSdkVersion=23
flutter.targetSdkVersion=35
flutter.ndkVersion=25.1.8937393
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
id "com.android.application" version '8.3.1' apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}

include ":app"
4 changes: 4 additions & 0 deletions linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
#include "generated_plugin_registrant.h"

#include <flutter_localization/flutter_localization_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) flutter_localization_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalizationPlugin");
flutter_localization_plugin_register_with_registrar(flutter_localization_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
}
1 change: 1 addition & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
flutter_localization
url_launcher_linux
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
6 changes: 6 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ import Foundation

import flutter_localization
import geolocator_apple
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
import url_launcher_macos
import wakelock_plus

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterLocalizationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalizationPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
}
Loading

0 comments on commit b193c35

Please sign in to comment.