File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : Android Build APK
2
2
3
+ env :
4
+ BRANCH_NAME : ${{ github.base_ref || github.ref_name }}
5
+
3
6
on :
4
7
push :
5
- tags :
6
- - ' * '
8
+ paths :
9
+ - ' version.properties '
7
10
workflow_dispatch :
8
11
inputs :
9
12
single_apk :
32
35
java-version : 17
33
36
distribution : adopt
34
37
35
- - if : ${{ inputs.single_apk == true }}
38
+ - if : ${{ inputs.single_apk == true || $BRANCH_NAME == 'develop' }}
36
39
run : sed -i -e '/isEnable/s/true/false/' app/build.gradle.kts
37
40
38
41
- name : Set MAL Client ID
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ plugins {
8
8
id(" com.google.devtools.ksp" )
9
9
}
10
10
11
- val properties = Properties ()
12
- properties.load(project.rootProject.file(" private.properties" ).reader())
11
+ val properties = Properties ().also {
12
+ it.load(project.rootProject.file(" private.properties" ).reader())
13
+ }
14
+ val versionProps = Properties ().also {
15
+ it.load(project.rootProject.file(" version.properties" ).reader())
16
+ }
13
17
14
18
android {
15
19
compileSdk = 35
@@ -18,8 +22,8 @@ android {
18
22
applicationId = " com.axiel7.moelist"
19
23
minSdk = 23
20
24
targetSdk = 35
21
- versionCode = 146
22
- versionName = " 3.7.1 "
25
+ versionCode = versionProps.getProperty( " code " ).toInt()
26
+ versionName = versionProps.getProperty( " name " )
23
27
setProperty(" archivesBaseName" , " moelist-v$versionName " )
24
28
25
29
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change
1
+ code = 146
2
+ name = 3.7.1
You can’t perform that action at this time.
0 commit comments