Skip to content

Commit

Permalink
Merge pull request #7 from nilac8991/master
Browse files Browse the repository at this point in the history
Upgrade gradle configurations & properly adapt CodeQL Script to run on all subprojects
  • Loading branch information
nrcg87 authored Sep 26, 2022
2 parents cc2fe48 + 670a54e commit b2c72bd
Show file tree
Hide file tree
Showing 74 changed files with 742 additions and 211 deletions.
216 changes: 186 additions & 30 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ on:
- cron: '18 18 * * 5'

jobs:
analyze:
name: Analyze
analyze_basic_intent:
name: Analyze BasicIntent1 project sources
runs-on: ubuntu-latest
permissions:
actions: read
Expand All @@ -45,32 +45,188 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# Commented out the following 2 command lines since it causes an error:
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

- run: make bootstrap
- run: make release

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/BasicIntent1/

- run: |
echo "Assemble BasicIntent1 debug build..."
cd ./BasicIntent1
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for BasicIntent1
uses: github/codeql-action/analyze@v2

analyze_data_capture:
name: Analyze DataCapture1 project sources
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/DataCapture1/

- run: |
echo "Assemble DataCapture1 debug build..."
cd ./DataCapture1
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for DataCapture1
uses: github/codeql-action/analyze@v2

analyze_document_capture_sample:
name: Analyze DocumentCaptureSample1 project sources
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/DocumentCaptureSample1/

- run: |
echo "Assemble DocumentCaptureSample1 debug build..."
cd ./DocumentCaptureSample1
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for DocumentCaptureSample1
uses: github/codeql-action/analyze@v2

analyze_signature_capture_one:
name: Analyze SignatureCapture1 project sources
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/SignatureCapture1/

- run: |
echo "Assemble SignatureCapture1 debug build..."
cd ./SignatureCapture1
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for SignatureCapture1
uses: github/codeql-action/analyze@v2

analyze_signature_capture_two:
name: Analyze SignatureCapture2 project sources
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/SignatureCapture2/

- run: |
echo "Assemble SignatureCapture2 debug build..."
cd ./SignatureCapture2
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for SignatureCapture2
uses: github/codeql-action/analyze@v2

analyze_truckloading_demo:
name: Analyze TruckLoadingDemo project sources
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: /home/runner/work/DataWedge-Android-Samples/DataWedge-Android-Samples/TruckLoadingDemo/

- run: |
echo "Assemble TruckLoadingDemo debug build..."
cd ./TruckLoadingDemo
./gradlew clean --continue assembleDebug || true
cd ..
- name: Perform CodeQL Analysis for TruckLoadingDemo
uses: github/codeql-action/analyze@v2
15 changes: 15 additions & 0 deletions BasicIntent1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions BasicIntent1/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions BasicIntent1/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions BasicIntent1/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions BasicIntent1/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions BasicIntent1/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions BasicIntent1/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
27 changes: 5 additions & 22 deletions BasicIntent1/build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
Binary file modified BasicIntent1/gradle/wrapper/gradle-wrapper.jar
100755 → 100644
Binary file not shown.
6 changes: 3 additions & 3 deletions BasicIntent1/gradle/wrapper/gradle-wrapper.properties
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Nov 02 13:42:03 EDT 2018
#Wed Sep 14 16:29:45 EEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
zipStoreBase=GRADLE_USER_HOME
15 changes: 15 additions & 0 deletions BasicIntent1/settings.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "BasicIntent1"
include ':app'
15 changes: 15 additions & 0 deletions DataCapture1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions DataCapture1/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions DataCapture1/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2c72bd

Please sign in to comment.