@@ -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
9287repositories {
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
9696dependencies {
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
137147task getVersionName () {
138148 project. gradle. projectsEvaluated {
139149 println " $project . android . defaultConfig . versionName "
0 commit comments