Skip to content

Commit b2c72bd

Browse files
authored
Merge pull request #7 from nilac8991/master
Upgrade gradle configurations & properly adapt CodeQL Script to run on all subprojects
2 parents cc2fe48 + 670a54e commit b2c72bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+742
-211
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 186 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ on:
2121
- cron: '18 18 * * 5'
2222

2323
jobs:
24-
analyze:
25-
name: Analyze
24+
analyze_basic_intent:
25+
name: Analyze BasicIntent1 project sources
2626
runs-on: ubuntu-latest
2727
permissions:
2828
actions: read
@@ -45,32 +45,188 @@ jobs:
4545
uses: github/codeql-action/init@v2
4646
with:
4747
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# 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
53-
# queries: security-extended,security-and-quality
54-
55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
# Commented out the following 2 command lines since it causes an error:
59-
# - name: Autobuild
60-
# uses: github/codeql-action/autobuild@v2
61-
62-
- run: make bootstrap
63-
- run: make release
64-
65-
# ℹ️ Command-line programs to run using the OS shell.
66-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
67-
68-
# If the Autobuild fails above, remove it and uncomment the following three lines.
69-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
70-
71-
# - run: |
72-
# echo "Run, Build Application using script"
73-
# ./location_of_script_within_repo/buildscript.sh
74-
75-
- name: Perform CodeQL Analysis
48+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/BasicIntent1/
49+
50+
- run: |
51+
echo "Assemble BasicIntent1 debug build..."
52+
cd ./BasicIntent1
53+
./gradlew clean --continue assembleDebug || true
54+
cd ..
55+
56+
- name: Perform CodeQL Analysis for BasicIntent1
57+
uses: github/codeql-action/analyze@v2
58+
59+
analyze_data_capture:
60+
name: Analyze DataCapture1 project sources
61+
runs-on: ubuntu-latest
62+
permissions:
63+
actions: read
64+
contents: read
65+
security-events: write
66+
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
language: [ 'java' ]
71+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
72+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
73+
74+
steps:
75+
- name: Checkout repository
76+
uses: actions/checkout@v3
77+
78+
# Initializes the CodeQL tools for scanning.
79+
- name: Initialize CodeQL
80+
uses: github/codeql-action/init@v2
81+
with:
82+
languages: ${{ matrix.language }}
83+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/DataCapture1/
84+
85+
- run: |
86+
echo "Assemble DataCapture1 debug build..."
87+
cd ./DataCapture1
88+
./gradlew clean --continue assembleDebug || true
89+
cd ..
90+
91+
- name: Perform CodeQL Analysis for DataCapture1
92+
uses: github/codeql-action/analyze@v2
93+
94+
analyze_document_capture_sample:
95+
name: Analyze DocumentCaptureSample1 project sources
96+
runs-on: ubuntu-latest
97+
permissions:
98+
actions: read
99+
contents: read
100+
security-events: write
101+
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
language: [ 'java' ]
106+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
107+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
108+
109+
steps:
110+
- name: Checkout repository
111+
uses: actions/checkout@v3
112+
113+
# Initializes the CodeQL tools for scanning.
114+
- name: Initialize CodeQL
115+
uses: github/codeql-action/init@v2
116+
with:
117+
languages: ${{ matrix.language }}
118+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/DocumentCaptureSample1/
119+
120+
- run: |
121+
echo "Assemble DocumentCaptureSample1 debug build..."
122+
cd ./DocumentCaptureSample1
123+
./gradlew clean --continue assembleDebug || true
124+
cd ..
125+
126+
- name: Perform CodeQL Analysis for DocumentCaptureSample1
127+
uses: github/codeql-action/analyze@v2
128+
129+
analyze_signature_capture_one:
130+
name: Analyze SignatureCapture1 project sources
131+
runs-on: ubuntu-latest
132+
permissions:
133+
actions: read
134+
contents: read
135+
security-events: write
136+
137+
strategy:
138+
fail-fast: false
139+
matrix:
140+
language: [ 'java' ]
141+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
142+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
143+
144+
steps:
145+
- name: Checkout repository
146+
uses: actions/checkout@v3
147+
148+
# Initializes the CodeQL tools for scanning.
149+
- name: Initialize CodeQL
150+
uses: github/codeql-action/init@v2
151+
with:
152+
languages: ${{ matrix.language }}
153+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/SignatureCapture1/
154+
155+
- run: |
156+
echo "Assemble SignatureCapture1 debug build..."
157+
cd ./SignatureCapture1
158+
./gradlew clean --continue assembleDebug || true
159+
cd ..
160+
161+
- name: Perform CodeQL Analysis for SignatureCapture1
162+
uses: github/codeql-action/analyze@v2
163+
164+
analyze_signature_capture_two:
165+
name: Analyze SignatureCapture2 project sources
166+
runs-on: ubuntu-latest
167+
permissions:
168+
actions: read
169+
contents: read
170+
security-events: write
171+
172+
strategy:
173+
fail-fast: false
174+
matrix:
175+
language: [ 'java' ]
176+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
177+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
178+
179+
steps:
180+
- name: Checkout repository
181+
uses: actions/checkout@v3
182+
183+
# Initializes the CodeQL tools for scanning.
184+
- name: Initialize CodeQL
185+
uses: github/codeql-action/init@v2
186+
with:
187+
languages: ${{ matrix.language }}
188+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/SignatureCapture2/
189+
190+
- run: |
191+
echo "Assemble SignatureCapture2 debug build..."
192+
cd ./SignatureCapture2
193+
./gradlew clean --continue assembleDebug || true
194+
cd ..
195+
196+
- name: Perform CodeQL Analysis for SignatureCapture2
197+
uses: github/codeql-action/analyze@v2
198+
199+
analyze_truckloading_demo:
200+
name: Analyze TruckLoadingDemo project sources
201+
runs-on: ubuntu-latest
202+
permissions:
203+
actions: read
204+
contents: read
205+
security-events: write
206+
207+
strategy:
208+
fail-fast: false
209+
matrix:
210+
language: [ 'java' ]
211+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
212+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
213+
214+
steps:
215+
- name: Checkout repository
216+
uses: actions/checkout@v3
217+
218+
# Initializes the CodeQL tools for scanning.
219+
- name: Initialize CodeQL
220+
uses: github/codeql-action/init@v2
221+
with:
222+
languages: ${{ matrix.language }}
223+
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/TruckLoadingDemo/
224+
225+
- run: |
226+
echo "Assemble TruckLoadingDemo debug build..."
227+
cd ./TruckLoadingDemo
228+
./gradlew clean --continue assembleDebug || true
229+
cd ..
230+
231+
- name: Perform CodeQL Analysis for TruckLoadingDemo
76232
uses: github/codeql-action/analyze@v2

BasicIntent1/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

BasicIntent1/.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BasicIntent1/.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BasicIntent1/.idea/gradle.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BasicIntent1/.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BasicIntent1/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BasicIntent1/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

BasicIntent1/build.gradle

100755100644
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
5-
repositories {
6-
google()
7-
jcenter()
8-
}
9-
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.1.3'
11-
12-
13-
// NOTE: Do not place your application dependencies here; they belong
14-
// in the individual module build.gradle files
15-
}
16-
}
17-
18-
allprojects {
19-
repositories {
20-
google()
21-
jcenter()
22-
}
2+
plugins {
3+
id 'com.android.application' version '7.2.0' apply false
4+
id 'com.android.library' version '7.2.0' apply false
5+
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
236
}
247

258
task clean(type: Delete) {
269
delete rootProject.buildDir
27-
}
10+
}

BasicIntent1/gradle/wrapper/gradle-wrapper.jar

100755100644
4.39 KB
Binary file not shown.

0 commit comments

Comments
 (0)