Skip to content

Commit

Permalink
Merge pull request #67 from tatsutakein-jp/rt/improve-gradle
Browse files Browse the repository at this point in the history
build: Gradle 関連ファイルのカイゼン
  • Loading branch information
tatsutakein authored Jan 26, 2024
2 parents eb91aae + f05fe4a commit ac612ff
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
20 changes: 1 addition & 19 deletions app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
buildscript {
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}

rootProject.buildDir = '../build'

subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
Expand Down
11 changes: 10 additions & 1 deletion app/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
org.gradle.jvmargs=-Xmx4G
########################################################
# Gradle
########################################################
org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx6g" -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g
org.gradle.parallel=true
org.gradle.caching=true

########################################################
# Android
########################################################
android.useAndroidX=true
android.enableJetifier=true
15 changes: 10 additions & 5 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ pluginManagement {
mavenCentral()
gradlePluginPortal()
}

plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
}
}

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

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}

include ":app"

0 comments on commit ac612ff

Please sign in to comment.