Skip to content

Commit

Permalink
🐛 fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Sep 6, 2024
1 parent e1c04c2 commit 81f9b6c
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ jobs:
sed -i "s/flutter_datetime_picker/flutter_datetime_picker_plus/g" lib/screens/RegisterScreen.dart
sed -i "s/file_picker: ^5.2.1/file_picker: ^8.1.2/g" pubspec.yaml
sed -i "s/photo_view: ^0.13.0/photo_view: ^0.15.0/g" pubspec.yaml
sed -i "s/dividerColor: Colors.grey.shade200/DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
sed -i "s/AppBarTheme(/AppBarTheme(titleTextStyle: const TextStyle(color: Colors.white),/g" lib/basic/config/Themes.dart
find lib -type f -name "*.dart" -exec sed -i "s/.headline4/.headlineMedium/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/.bodyText1/.bodyMedium/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/ImageStreamCompleter load(/ImageStreamCompleter loadImage(/g" {} \;
Expand All @@ -314,6 +316,7 @@ jobs:
find lib -type f -name "*.dart" -exec sed -i "s/as ui show Codec/as ui/g" {} \;
flutter pub upgrade
flutter pub get
cp -rf compatible/* ./
- name: Upgrade deps version (flutter3 mac)
if: steps.check_asset.outputs.skip_build != 'true' && startsWith(matrix.config.host, 'macos-') && startsWith(matrix.config.flutter_version, '3.22.3')
Expand All @@ -327,6 +330,8 @@ jobs:
gsed -i "s/flutter_datetime_picker/flutter_datetime_picker_plus/g" lib/screens/RegisterScreen.dart
gsed -i "s/file_picker: ^5.2.1/file_picker: ^8.1.2/g" pubspec.yaml
gsed -i "s/photo_view: ^0.13.0/photo_view: ^0.15.0/g" pubspec.yaml
gsed -i "s/dividerColor: Colors.grey.shade200/DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
gsed -i "s/AppBarTheme(/AppBarTheme(titleTextStyle: const TextStyle(color: Colors.white),/g" lib/basic/config/Themes.dart
find lib -type f -name "*.dart" -exec gsed -i "s/.headline4/.headlineMedium/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/.bodyText1/.bodyMedium/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/ImageStreamCompleter load(/ImageStreamCompleter loadImage(/g" {} \;
Expand Down
50 changes: 50 additions & 0 deletions compatible/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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"
}

android {
namespace = "opensource.pikapika"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "opensource.pikapika"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}

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.kotlinx:kotlinx-coroutines-android:1.8.1'
implementation fileTree(dir: "../../go/mobile/lib", include: ["*.jar", "*.aar"])
}

18 changes: 18 additions & 0 deletions compatible/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
allprojects {
repositories {
google()
mavenCentral()
}
}

rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
3 changes: 3 additions & 0 deletions compatible/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
5 changes: 5 additions & 0 deletions compatible/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
25 changes: 25 additions & 0 deletions compatible/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"

0 comments on commit 81f9b6c

Please sign in to comment.