Skip to content

Commit 6f0b8ac

Browse files
Fix actions builds
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 5a38e9a commit 6f0b8ac

3 files changed

Lines changed: 50 additions & 29 deletions

File tree

.github/workflows/build-debug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
caches
4545
notifications
4646
jdks
47+
${{ github.workspace }}/.gradle/configuration-cache
4748
4849
- name: Change wrapper permissions
4950
run: chmod +x ./gradlew

.github/workflows/codeql.yml

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ name: "CodeQL"
1414
on:
1515
push:
1616
branches: [ "master" ]
17-
pull_request:
18-
# The branches below must be a subset of the branches above
17+
pull_request: # The branches below must be a subset of the branches above
1918
branches: [ "master" ]
2019
schedule:
2120
- cron: '24 17 * * 0'
@@ -39,38 +38,57 @@ jobs:
3938
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4039

4140
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@v3
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
4443

45-
# Initializes the CodeQL tools for scanning.
46-
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
48-
with:
49-
languages: ${{ matrix.language }}
50-
# If you wish to specify custom queries, you can do so here or in a config file.
51-
# By default, queries listed here will override any specified in a config file.
52-
# Prefix the list here with "+" to use these queries and those in the config file.
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
5352

54-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55-
# queries: security-extended,security-and-quality
53+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
54+
# queries: security-extended,security-and-quality
5655

5756

58-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59-
# If this step fails, then you should remove it and run the build manually (see below)
60-
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
57+
- name: Set up Java 19
58+
uses: actions/setup-java@v3
59+
with:
60+
java-version: 19
61+
distribution: 'temurin'
6262

63-
# ℹ️ Command-line programs to run using the OS shell.
64-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63+
- name: Setup Android SDK
64+
uses: android-actions/setup-android@v2
6565

66-
# If the Autobuild fails above, remove it and uncomment the following three lines.
67-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66+
- name: Setup Gradle
67+
uses: gradle/gradle-build-action@v2
68+
with:
69+
gradle-home-cache-includes: |
70+
caches
71+
notifications
72+
jdks
73+
${{ github.workspace }}/.gradle/configuration-cache
6874
69-
# - run: |
70-
# echo "Run, Build Application using script"
71-
# ./location_of_script_within_repo/buildscript.sh
75+
- name: Change wrapper permissions
76+
run: chmod +x ./gradlew
7277

73-
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
75-
with:
76-
category: "/language:${{matrix.language}}"
78+
- name: Build apk debug
79+
run: ./gradlew app:assembleDefaultDebug
80+
81+
# ℹ️ Command-line programs to run using the OS shell.
82+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
83+
84+
# If the Autobuild fails above, remove it and uncomment the following three lines.
85+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
86+
87+
# - run: |
88+
# echo "Run, Build Application using script"
89+
# ./location_of_script_within_repo/buildscript.sh
90+
91+
- name: Perform CodeQL Analysis
92+
uses: github/codeql-action/analyze@v2
93+
with:
94+
category: "/language:${{matrix.language}}"

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ dependencyResolutionManagement {
2323
}
2424
}
2525

26+
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
27+
2628
// val isCiServer = System.getenv().containsKey("CI")
2729
// Cache build artifacts, so expensive operations do not need to be re-computed
2830
buildCache {

0 commit comments

Comments
 (0)