Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android v2.4.1 において、起動しない問題の緊急対応 #662

Merged
merged 4 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "org.jetbrains.kotlin.android"
id "com.google.gms.google-services"
id "com.google.firebase.crashlytics"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -19,6 +11,17 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

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.')
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'kotlin-android'

apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "net.yumnmm.eqmonitor"
compileSdk 34
Expand All @@ -27,12 +30,12 @@ android {

// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = '1.8'
}

sourceSets {
Expand All @@ -42,7 +45,7 @@ android {
defaultConfig {
applicationId 'net.yumnumm.eqmonitor'
minSdkVersion 26
targetSdk 34
targetSdkVersion 34
multiDexEnabled true
versionCode localProperties.getProperty('flutter.versionCode').toInteger()
versionName localProperties.getProperty('flutter.versionName')
Expand Down Expand Up @@ -84,7 +87,7 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:31.5.0')
Expand All @@ -101,3 +104,5 @@ dependencies {
implementation 'androidx.window:window-java:1.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

apply plugin: 'com.google.firebase.crashlytics'
37 changes: 37 additions & 0 deletions app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
buildscript {
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.google.gms:google-services:4.3.14'

classpath 'com.google.firebase:perf-plugin:1.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -17,3 +35,22 @@ tasks.register("clean", Delete) {
delete rootProject.buildDir
}

gradle.taskGraph.whenReady { taskGraph ->
def tasks = taskGraph.getAllTasks()
def buildTasks = tasks.find { it.name.startsWith('build') && it.getGroup() == 'build' }
if (buildTasks) {
tasks.findAll {it.name.startsWith('test')}.each { task ->
task.enabled = false
}
}
}

gradle.taskGraph.whenReady { taskGraph ->
def tasks = taskGraph.getAllTasks()
def buildTasks = tasks.find { it.name.startsWith('build') && it.getGroup() == 'build' }
if (buildTasks) {
tasks.findAll {it.name.startsWith('test')}.each { task ->
task.enabled = false
}
}
}
32 changes: 8 additions & 24 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
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
}()
include ':app'

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

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

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.23" apply false
id "com.google.gms.google-services" version "4.4.0" apply false
id "com.google.firebase.crashlytics" version "2.9.9" apply false
}

include ":app"
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"
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: eqmonitor
description: An earthquake monitoring Application
publish_to: "none"

version: 2.4.1+1113
version: 2.4.2+1114

environment:
sdk: ^3.3.0
Expand Down
Loading