Skip to content

Commit

Permalink
disable dependenciesInfo for base flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
Razeeman committed Jan 25, 2025
1 parent edf5ad7 commit 55e38a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.example.util.simpletimetracker.Base
import com.example.util.simpletimetracker.applyAndroidLibrary
import dagger.hilt.android.plugin.util.capitalize

plugins {
alias(libs.plugins.gradleApplication)
Expand Down Expand Up @@ -52,19 +53,29 @@ android {
}

flavorDimensions += "version"

val baseFlavor = "base"
val playFlavor = "play"
productFlavors {
// F-Droid version, no google play services, no Wear OS support.
create("base") {
create(baseFlavor) {
dimension = "version"
}
// Google Play version, with google play services, Wear OS support.
create("play") {
create(playFlavor) {
dimension = "version"
isDefault = true
}
}

// Disables dependency metadata when building APKs.
// If enabled, creates a file in app/build/outputs/sdk-dependencies/
dependenciesInfo {
val taskName = gradle.startParameter.taskRequests.toString().lowercase()
val enabled = taskName.contains("assemble${playFlavor}release")
includeInApk = enabled
includeInBundle = enabled
}

buildFeatures {
buildConfig = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.util.simpletimetracker

import com.example.util.simpletimetracker.domain.interactor.WearInteractor
import com.example.util.simpletimetracker.domain.wear.WearInteractor
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
Expand Down

0 comments on commit 55e38a1

Please sign in to comment.