Skip to content

Commit 5a7d47e

Browse files
Merge pull request #28 from tim-littlefair/task27-gh_security_scan_reports
Task27 gh security scan reports
2 parents 096b9f5 + 22e9e0b commit 5a7d47e

File tree

11 files changed

+40
-273
lines changed

11 files changed

+40
-273
lines changed

android-app/build.gradle

+5-22
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id 'com.android.application'
33
id 'base'
44
id 'com.jaredsburrows.license' version '0.9.7'
5-
id 'com.google.gms.google-services'
65
}
76

87
def kspath = "$System.env.kspath"
@@ -22,27 +21,11 @@ android {
2221
applicationId "net.heretical_camelid.transit_emv_checker.android_app"
2322
minSdk 26
2423
targetSdk 34
25-
// Google Play store requires versionCode for releases to be
26-
// monotonically increasing
27-
// as I had already used versionCode 235097892 before I found
28-
// this out, the pattern is now
29-
// prefix 30
30-
// 2 digits each for for major, minor, patch version number
31-
// 1 trailing digit starts at zero can be updated for successive
32-
// attempts within the same release number
33-
versionCode 300002000
34-
// For builds triggered under build_and_test_everything.sh
35-
// where the working directory exactly matches git HEAD,
36-
// the 7-hex-prefix of the current git HEAD hash will
37-
// be substituted for the $vname_suffix variable
38-
// in the line below.
39-
// For other builds, the variable may include an
40-
// additional 3-hex-digit suffix derived from the
41-
// hash of git HEAD, or may be the string 'dirty'.
42-
43-
// Builds done directly using .gradlew will use the
44-
// value 'dirty' in place of the hash suffix.
45-
versionName "0.2.x-$vname_suffix"
24+
25+
// Version name and number are managed in the root build.gradle file
26+
versionCode rootProject.ext.versionCode
27+
versionName rootProject.ext.versionName+"-$vname_suffix"
28+
4629
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4730
}
4831
signingConfigs {

android-app/build_and_run.sh

-15
This file was deleted.

android-app/google-services.json

-29
This file was deleted.

android-app/src/androidTest/java/net/heretical_camelid/transit_emv_checker/android_app/TECTestSuiteBase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class TECTestSuiteBase {
6767
private static final int _LAUNCH_TIMEOUT_SECONDS = 10;
6868
// At any point where we are waiting for a UI element to
6969
// appear, we use this timeout
70-
private static final int _UI_APPEAR_TIMEOUT_SECONDS = 7;
70+
private static final int _UI_APPEAR_TIMEOUT_SECONDS = 10;
7171
// At any point where we are waiting for a UI element to change
7272
// state, we use this unconditional sleep
7373
protected static final int _UI_CHANGE_SLEEP_SECONDS = 1;

build.gradle

+25-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,28 @@
22
plugins {
33
id 'com.android.application' version '8.5.2' apply false
44
id 'com.google.gms.google-services' version '4.4.2' apply false
5-
}
5+
}
6+
7+
// Version numbering mainly relates to the android-app subproject
8+
// but is managed here to keep it consistent across the other
9+
// subprojects
10+
11+
// Google Play store requires versionCode for releases to be
12+
// monotonically increasing
13+
// as I had already used versionCode 235097892 before I found
14+
// this out, the pattern is now
15+
// prefix 30
16+
// 2 digits each for for major, minor, patch version number
17+
// 1 trailing digit starts at zero can be updated for successive
18+
// attempts within the same release number
19+
// For builds triggered under build_and_test_everything.sh
20+
// where the working directory exactly matches git HEAD,
21+
// the 7-hex-prefix of the current git HEAD hash will
22+
// be substituted for the $vname_suffix variable
23+
// in the line below.
24+
// For other builds, the variable may include an
25+
// additional 3-hex-digit suffix derived from the
26+
// hash of git HEAD, or may be the string 'dirty'.
27+
ext.versionCode=300002010
28+
29+
ext.versionName="0.2.1"

build_and_test_everything.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ build_debug_and_coverage() {
3636
build_release() {
3737
./gradlew build bundleRelease lintVitalReportRelease
3838
echo Copying artifacts to $build_dir
39-
find android-app/build/outputs/bundle -name *.aab -exec cp {} $build_dir \;
39+
find android-app/build/outputs -name *.aab -exec cp {} $build_dir \;
40+
find android-app/build/outputs -name *.apk -exec cp {} $build_dir \;
4041
cp android-app/build/reports/*.html $build_dir
4142
}
4243

@@ -50,13 +51,17 @@ export githash=$build_id
5051

5152
if [ "$1" = "--rehearse-release" ]
5253
then
54+
# This option builds the software and the release directory
55+
# but skips the defaultGoogleATD test set which
56+
# speeds the build up considerably
5357
build_release
5458
else
5559
build_debug_and_coverage
5660
fi
5761

5862
if [ "$1" = "--execute-release" ]
5963
then
64+
# build_debug_and_coverage will already have been done
6065
build_release
6166
fi
6267

pcsc-cli-app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = 'net.heretical_camelid.transit_emv_checker.pcsc_cli_app'
6-
version = '0.2.0'
6+
version = rootProject.ext.versionName
77

88
dependencies {
99
implementation project(':tec-library')

pom.xml

-170
This file was deleted.

tec-library/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ java {
1010
targetCompatibility = JavaVersion.VERSION_17
1111
}
1212
group = 'net.heretical_camelid.transit_emv_checker.library'
13-
version = '0.1.0'
13+
version = rootProject.ext.versionName
1414

1515
dependencies {
1616
implementation "com.github.devnied.emvnfccard:library:3.0.1"

tec-library/build_and_run_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
variant=tec-library
4-
version=0.1.0
4+
version=0.2.1
55
mainclass=net.heretical_camelid.transit_emv_checker.library.TapReplayConductor
66
args=tec-library/src/main/assets/visa-exp2402-5406.xml
77

tec-library/pom.xml

-31
This file was deleted.

0 commit comments

Comments
 (0)