Skip to content

Commit

Permalink
fix: sourceSets dir fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-chekyrta committed Jun 7, 2024
1 parent 1bc1d4c commit 3980a15
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def config = configHelper.fetchConfig()
def appId = config.getOrDefault("APPLICATION_ID", "org.openedx.app")
def platformName = config.getOrDefault("PLATFORM_NAME", "OpenEdx").toLowerCase()
def themeDirectory = config.getOrDefault("THEME_DIRECTORY", "openedx")
def firebaseConfig = config.get('FIREBASE')
def firebaseEnabled = firebaseConfig?.getOrDefault('ENABLED', false)

Expand Down Expand Up @@ -63,13 +63,13 @@ android {

sourceSets {
prod {
res.srcDirs = ["src/$platformName/res"]
res.srcDirs = ["src/$themeDirectory/res"]
}
develop {
res.srcDirs = ["src/$platformName/res"]
res.srcDirs = ["src/$themeDirectory/res"]
}
stage {
res.srcDirs = ["src/$platformName/res"]
res.srcDirs = ["src/$themeDirectory/res"]
}
}

Expand Down
14 changes: 7 additions & 7 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ plugins {

def currentFlavour = getCurrentFlavor()
def config = configHelper.fetchConfig()
def platformName = config.getOrDefault("PLATFORM_NAME", "OpenEdx").toLowerCase()
def themeDirectory = config.getOrDefault("THEME_DIRECTORY", "openedx")

android {
compileSdk 34
Expand Down Expand Up @@ -50,16 +50,16 @@ android {

sourceSets {
prod {
java.srcDirs = ["src/$platformName"]
res.srcDirs = ["src/$platformName/res"]
java.srcDirs = ["src/$themeDirectory"]
res.srcDirs = ["src/$themeDirectory/res"]
}
develop {
java.srcDirs = ["src/$platformName"]
res.srcDirs = ["src/$platformName/res"]
java.srcDirs = ["src/$themeDirectory"]
res.srcDirs = ["src/$themeDirectory/res"]
}
stage {
java.srcDirs = ["src/$platformName"]
res.srcDirs = ["src/$platformName/res"]
java.srcDirs = ["src/$themeDirectory"]
res.srcDirs = ["src/$themeDirectory/res"]
}
main {
assets {
Expand Down
2 changes: 2 additions & 0 deletions default_config/dev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BRANCH:
#Platform names
PLATFORM_NAME: "OpenEdX"
PLATFORM_FULL_NAME: "OpenEdX"
#App sourceSets dir
THEME_DIRECTORY: "openedx"
#tokenType enum accepts JWT and BEARER only
TOKEN_TYPE: "JWT"
#feature flag for activating What’s New feature
Expand Down
2 changes: 2 additions & 0 deletions default_config/prod/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BRANCH:
#Platform names
PLATFORM_NAME: "OpenEdX"
PLATFORM_FULL_NAME: "OpenEdX"
#App sourceSets dir
THEME_DIRECTORY: "openedx"
#tokenType enum accepts JWT and BEARER only
TOKEN_TYPE: "JWT"
#feature flag for activating What’s New feature
Expand Down
2 changes: 2 additions & 0 deletions default_config/stage/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BRANCH:
#Platform names
PLATFORM_NAME: "OpenEdX"
PLATFORM_FULL_NAME: "OpenEdX"
#App sourceSets dir
THEME_DIRECTORY: "openedx"
#tokenType enum accepts JWT and BEARER only
TOKEN_TYPE: "JWT"
#feature flag for activating What’s New feature
Expand Down

0 comments on commit 3980a15

Please sign in to comment.