Skip to content

Commit

Permalink
Build improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusRodCosta committed Sep 25, 2023
1 parent d5b3290 commit 5fa22b4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
26 changes: 14 additions & 12 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

kotlin {
jvmToolchain 17
}

android {
namespace "com.mateusrodcosta.apps.vidyamusic"

compileSdk 33
defaultConfig {
applicationId "com.mateusrodcosta.apps.vidyamusic"
Expand All @@ -42,17 +47,6 @@ android {
versionName flutterVersionName
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
Expand All @@ -61,6 +55,7 @@ android {
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
minifyEnabled true
Expand All @@ -80,12 +75,19 @@ android {
manifestPlaceholders = [appName: "Vidya Music (Profile)"]
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
}

flutter {
source '../..'
}

dependencies {
implementation libs.kotlin.stdlib
}
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ plugins {
alias libs.plugins.kotlin.android apply false
}

rootProject.buildDir = '../build'
rootProject.layout.buildDirectory.set(new File('../build'))
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.layout.buildDirectory.set(rootProject.layout.buildDirectory.dir(project.name))
}
subprojects {
project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}
4 changes: 3 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
android.useAndroidX=true
android.useAndroidX=true
org.gradle.caching=true
org.gradle.parallel=true
1 change: 0 additions & 1 deletion android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ androidGradlePlugin = "8.1.1"
kotlinVersion = "1.9.10"

[libraries]
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinVersion" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencyResolutionManagement {
mavenCentral()
}
}
rootProject.name = "vidya_music"
rootProject.name = "Vidya Music"
include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
Expand Down

0 comments on commit 5fa22b4

Please sign in to comment.