Skip to content

Commit 631cb0c

Browse files
authored
Merge pull request #153 from RoboTutorLLC/2024-12-27-fix-dependencies
2024 12 27 fix dependencies
2 parents 551fb21 + f55381e commit 631cb0c

4 files changed

Lines changed: 48 additions & 33 deletions

File tree

.github/workflows/build-workflow.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ jobs:
1414
runs-on: 'ubuntu-latest'
1515
steps:
1616
- name: Checkout Repo
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v3 # This step checks out the repository so that workflow can access the code.
18+
19+
- name: Set up JDK 11 # 👈 We are explicitly setting Java version to 11 to ensure compatibility with Gradle 6.5.
20+
uses: actions/setup-java@v3 # GitHub-provided action to set up Java.
21+
with:
22+
distribution: 'temurin' # We are using the Temurin (Adoptium) distribution.
23+
java-version: '11' # Setting Java to version 11 because Gradle 6.5 does not support Java 17.
1824

1925
- name: Build project
2026
run: ./gradlew assembleDebug
@@ -44,7 +50,7 @@ jobs:
4450
run: mv build/robotutor.debug.${{ steps.fetch_version_name.outputs.VERSION_NAME }}.apk build/${{ steps.fetch_apk_name.outputs.APK_NAME }}.apk
4551

4652
- name: Upload APK
47-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
4854
with:
4955
name: ${{ steps.fetch_apk_name.outputs.APK_NAME }}.apk
50-
path: build/${{ steps.fetch_apk_name.outputs.APK_NAME }}.apk
56+
path: build/${{ steps.fetch_apk_name.outputs.APK_NAME }}.apk

app/build.gradle

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,23 @@ android {
1010
targetSdkVersion rootProject.ext.rtTargetSdkVersion
1111
versionCode rootProject.ext.rtVersionCode
1212
versionName rootProject.ext.rtVersionName
13-
// default is signed by the Android default key
1413

14+
// Enable multidex support
1515
multiDexEnabled true
1616
}
1717

1818
testOptions {
19+
// Ensure unit tests return default values for easier testing
1920
unitTests.returnDefaultValues = true
2021
}
2122

22-
// Create a variable called keystorePropertiesFile, and initialize it to your
23-
// keystore.properties file, in the sample_config_files folder, inside app/src.
23+
// Load keystore properties for signing
2424
def keystorePropertiesFile = rootProject.file("app/src/sample_config_files/sample_keystore.properties")
25-
// Initialize a new Properties() object called keystoreProperties
2625
def keystoreProperties = new Properties()
27-
28-
// Load your keystore.properties file into the keystoreProperties object.
2926
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
3027

3128
signingConfigs {
29+
// Signing configuration for release builds
3230
android {
3331
keyAlias keystoreProperties['keyAlias']
3432
keyPassword keystoreProperties['keyPassword']
@@ -38,70 +36,77 @@ android {
3836
}
3937

4038
buildTypes {
41-
39+
// Configuration for release builds
4240
release {
4341
signingConfig signingConfigs.android
4442
minifyEnabled false
4543
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4644
}
45+
// Configuration for debug builds
4746
debug {
4847
debuggable true
4948
}
50-
51-
// This release includes the DEBUG selector and other various debug support features.
52-
//
49+
// Custom debug build type with signing
5350
release_dbg {
5451
debuggable true
5552
signingConfig signingConfigs.android
5653
}
57-
5854
}
5955

60-
// define apk naming behavior
61-
// define apk naming behavior
56+
// Define APK naming behavior
6257
applicationVariants.all { variant ->
6358
variant.outputs.each { output ->
6459
def project = "robotutor"
6560
def SEP = "."
6661
def buildType = variant.buildType.name
6762
def version = variant.versionName
6863

64+
// Set a custom APK name
6965
def newApkName = project + SEP + buildType + SEP + version + ".apk"
70-
// new File(output.outputFile.parent, newApkName)
7166
output.outputFileName = new File("./../../../../../build/", newApkName)
7267
}
7368
}
7469

7570
lintOptions {
76-
// set to true to turn off analysis progress reporting by lint
71+
// Set to true to turn off analysis progress reporting by lint
7772
quiet false
78-
// if true, stop the gradle build if errors are found
73+
// If true, stop the gradle build if errors are found
7974
abortOnError false
80-
// if true, only report errors
75+
// If true, only report errors
8176
ignoreWarnings true
8277
}
8378

79+
// Apply checkstyle for code quality checks
8480
apply from: "checkstyle.gradle"
85-
afterEvaluate{
81+
afterEvaluate {
8682
preBuild.dependsOn('checkstyle')
8783
check.dependsOn 'checkstyle'
8884
}
89-
9085
}
9186

9287
repositories {
88+
google()
9389
mavenCentral()
90+
// Added the custom Maven repository for utilcode
91+
maven {
92+
url 'http://maven.xdja.com:8081/nexus3/repository/aliyun/'
93+
}
9494
}
9595

9696
dependencies {
97+
// Unit testing dependency
9798
testImplementation 'junit:junit:4.12'
99+
100+
// Core dependencies
98101
implementation 'com.writingminds:FFmpegAndroid:0.3.2'
99102
implementation 'com.google.guava:guava:25.0-android'
100103
implementation 'androidx.appcompat:appcompat:1.0.0'
101104
implementation 'androidx.percentlayout:percentlayout:1.0.0'
102105
implementation 'com.google.code.gson:gson:2.8.7'
103106
implementation 'org.mp4parser:isoparser:1.9.41'
104107
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
108+
109+
// Project-specific dependencies
105110
implementation project(':comp_banner')
106111
implementation project(':comp_ltkplus')
107112
implementation project(':util')
@@ -128,12 +133,17 @@ dependencies {
128133
implementation project(path: ':comp_picmatch')
129134
implementation project(path: ':comp_bigmath')
130135
implementation project(path: ':comp_spelling')
131-
132136
implementation project(path: ':comp_intervention')
137+
138+
// Dependency resolved from custom Maven repository
139+
implementation 'com.blankj:utilcode:1.24.4'
140+
141+
// External libraries
133142
implementation 'com.github.RoboTutorLLC:ScreenRecordHelper:1.0.0'
134143
implementation 'com.github.HBiSoft:HBRecorder:2.0.3'
135144
}
136145

146+
// Task to retrieve version name
137147
task getVersionName() {
138148
project.gradle.projectsEvaluated {
139149
println "$project.android.defaultConfig.versionName"

build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
109
classpath 'com.android.tools.build:gradle:4.1.3'
1110

1211
// NOTE: Do not place your application dependencies here; they belong
@@ -23,9 +22,15 @@ allprojects {
2322
google()
2423
}
2524

25+
dependencies {
26+
modules {
27+
module("com.google.android:flexbox") {
28+
replacedBy("com.google.android.flexbox:flexbox")
29+
}
30+
}
31+
}
32+
2633
// Global variables common to all modules
27-
// see: http://tools.android.com/tech-docs/new-build-system/tips
28-
//
2934
ext {
3035
rtCompileSdkVersion=29 //Integer
3136
rtBuildToolsVersion="26.0.1" //String
@@ -34,23 +39,17 @@ allprojects {
3439

3540
// Note that using target version 22 bypasses the new run-time permissions found
3641
// in Marshmallow 23
37-
//
3842
rtTargetSdkVersion=22
3943

4044
rtVersionCode=1
4145

4246
// Semantic versioning description:
4347
// <Milestone release> <Feature Release> <Patch release> <Asset Compatibility INDEX>
44-
45-
4648
rtVersionName="3.5.0.1"
4749
//TODO: move this out of build so we don't have to rebuild to unzip assets
48-
4950
}
5051
}
5152

5253
task clean(type: Delete) {
5354
delete rootProject.buildDir
5455
}
55-
56-

comp_nd/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ dependencies {
3434
api project (':resources')
3535
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3636

37-
implementation 'com.google.android:flexbox:1.0.0'
37+
implementation 'com.google.android.flexbox:flexbox:3.0.0'
3838
}

0 commit comments

Comments
 (0)