Skip to content

Commit

Permalink
Rename projects to path names
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenyomi committed Feb 13, 2024
1 parent e243b4e commit 53ea770
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ jobs:
- name: Build extensions (chunk ${{ matrix.chunk }})
env:
CI_CHUNK_NUM: ${{ matrix.chunk }}
run: ./gradlew assembleDebug
run: ./gradlew -p src assembleDebug
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew assembleRelease
run: ./gradlew -p src assembleRelease

- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
Expand Down
13 changes: 3 additions & 10 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,20 @@ if (System.getenv("CI") != "true") {
run {
// Loads individual extensions
File(rootDir, "src").getChunk(chunk, chunkSize)?.forEach {
val name = ":extensions:individual:${it.parentFile.name}:${it.name}"
println(name)
include(name)
project(name).projectDir = File("src/${it.parentFile.name}/${it.name}")
include("src:${it.parentFile.name}:${it.name}")
}
}
}

fun loadAllIndividualExtensions() {
File(rootDir, "src").eachDir { dir ->
dir.eachDir { subdir ->
val name = ":extensions:individual:${dir.name}:${subdir.name}"
include(name)
project(name).projectDir = File("src/${dir.name}/${subdir.name}")
include("src:${dir.name}:${subdir.name}")
}
}
}
fun loadIndividualExtension(lang: String, name: String) {
val projectName = ":extensions:individual:$lang:$name"
include(projectName)
project(projectName).projectDir = File("src/${lang}/${name}")
include("src:${lang}:${name}")
}

fun File.getChunk(chunk: Int, chunkSize: Int): List<File>? {
Expand Down

0 comments on commit 53ea770

Please sign in to comment.