Skip to content

Commit

Permalink
Merge pull request #53 from 0Nom4D/BUMP.Flutter_3.22
Browse files Browse the repository at this point in the history
Bumping dependencies versions and Flutter version to 3.22
  • Loading branch information
0Nom4D authored May 19, 2024
2 parents 0a0841e + 5ab44fe commit a9bd529
Show file tree
Hide file tree
Showing 19 changed files with 173 additions and 175 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Flutter MultiPlatform Build

on: [ push, pull_request, workflow_dispatch ]
on: [ pull_request, workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
check-latest: true
cache: 'gradle'
- name: Flutter Install
uses: subosito/flutter-action@v2.10.0
uses: subosito/flutter-action@v2.16.0
with:
channel: 'stable'
architecture: x64
Expand All @@ -28,8 +34,14 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
check-latest: true
cache: 'gradle'
- name: Flutter Install
uses: subosito/flutter-action@v2.10.0
uses: subosito/flutter-action@v2.16.0
with:
channel: 'stable'
architecture: x64
Expand Down
129 changes: 57 additions & 72 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,72 +1,57 @@
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 {
namespace "dock.guardian.guardian_dock"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dock.guardian.guardian_dock"
// 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.
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// 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
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
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()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

android {
namespace "dock.guardian.guardian_dock"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dock.guardian.guardian_dock"
// 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.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// 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
}
}
}

flutter {
source '../..'
}
13 changes: 0 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
30 changes: 22 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
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.7.10" apply false
}

include ":app"
52 changes: 26 additions & 26 deletions ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
5 changes: 2 additions & 3 deletions lib/src/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ const ColorScheme appScheme = ColorScheme(
primary: destinyDarkNavyBlue,
secondary: destinyDarkGrey,
tertiary: destinyYellowLight,
background: destinyDarkGrey,
brightness: Brightness.light,
onError: dangerColor,
error: dangerColor,
onPrimary: destinyClearGrey,
onSecondary: destinyClearGrey,
onBackground: destinyClearGrey,
onSurfaceVariant: destinyClearGrey,
surface: destinyDarkNavyBlue,
onSurface: destinyClearGrey
);

class AppTheme {
static final ThemeData defaultTheme = ThemeData(
fontFamily: 'NeueHaasDisplay',
scaffoldBackgroundColor: appScheme.background,
scaffoldBackgroundColor: appScheme.surface,
colorScheme: appScheme,
useMaterial3: true
);
Expand Down
6 changes: 3 additions & 3 deletions lib/src/views/article_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ArticleView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
appBar: GuardianDockAppbar(title: article.title),
body: CustomScrollView(
slivers: [
Expand All @@ -31,12 +31,12 @@ class ArticleView extends StatelessWidget {
return { 'color': "#${Theme.of(context).colorScheme.tertiary.value.toRadixString(16).substring(2)}" };
}
if (element.outerHtml.startsWith("<td")) {
return { 'border': "1px dotted #${Theme.of(context).colorScheme.onBackground.value.toRadixString(16).substring(2)}" };
return { 'border': "1px dotted #${Theme.of(context).colorScheme.onSurface.value.toRadixString(16).substring(2)}" };
}

return null;
},
textStyle: TextStyle(color: Theme.of(context).colorScheme.onBackground),
textStyle: TextStyle(color: Theme.of(context).colorScheme.onSurface),
),
),
),
Expand Down
8 changes: 4 additions & 4 deletions lib/src/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _HomeViewState extends State<HomeView> implements AutomaticKeepAliveClient
}
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
appBar: const GuardianDockAppbar(),
body: GestureDetector(
onTap: () {
Expand All @@ -86,7 +86,7 @@ class _HomeViewState extends State<HomeView> implements AutomaticKeepAliveClient
shrinkWrap: true,
slivers: [
SliverAppBar(
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
toolbarHeight: MediaQuery.of(context).size.height * .05,
collapsedHeight: MediaQuery.of(context).size.height * .05,
expandedHeight: MediaQuery.of(context).size.height * .1,
Expand All @@ -101,7 +101,7 @@ class _HomeViewState extends State<HomeView> implements AutomaticKeepAliveClient
text: TextSpan(
text: "Track",
style: TextStyle(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
fontSize: 35,
fontWeight: FontWeight.bold
),
Expand All @@ -128,7 +128,7 @@ class _HomeViewState extends State<HomeView> implements AutomaticKeepAliveClient
"View all your statistics on the same platform.",
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
fontSize: 20,
fontWeight: FontWeight.w500
),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/account_suggestion_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class AccountSuggestionTile extends StatelessWidget {
).toString()
),
title: Text(relatedAccount.fullBungieId),
tileColor: Theme.of(context).colorScheme.background,
textColor: Theme.of(context).colorScheme.onBackground
tileColor: Theme.of(context).colorScheme.surface,
textColor: Theme.of(context).colorScheme.onSurface
);
}
}
Loading

0 comments on commit a9bd529

Please sign in to comment.