Skip to content

Commit cd6dc1f

Browse files
authored
Finish release/2.2.0
Release/2.2.0
2 parents 099bb73 + 2195843 commit cd6dc1f

File tree

80 files changed

+5460
-3523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+5460
-3523
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17-
- name: Setup JDK 1.8
18-
uses: actions/setup-java@v1
17+
- name: Setup JDK 11
18+
uses: actions/setup-java@v2
1919
with:
20-
java-version: 1.8
20+
distribution: 'temurin'
21+
java-version: '11'
22+
cache: 'gradle'
2123

2224
- name: Environment info
2325
run: |
@@ -48,5 +50,3 @@ jobs:
4850
with:
4951
name: openimis-policies-aab-${{github.run_number}}-${{github.sha}}
5052
path: ./app/build/outputs/**/*.aab
51-
52-

.github/workflows/manual.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ on:
2424
cli_res_dir:
2525
description: Resources folder for icons. Only works with application_id_suffix .cli
2626
required: false
27+
cli_assets_dir:
28+
description: Asserts folder for images, json files.... Only works with .cli
29+
required: false
2730
# Branch is chosen by default in github manual actions
2831

2932
jobs:
@@ -33,10 +36,12 @@ jobs:
3336
steps:
3437
- uses: actions/checkout@v2
3538

36-
- name: Setup JDK 1.8
37-
uses: actions/setup-java@v1
39+
- name: Setup JDK 11
40+
uses: actions/setup-java@v2
3841
with:
39-
java-version: 1.8
42+
distribution: 'temurin'
43+
java-version: '11'
44+
cache: 'gradle'
4045

4146
- uses: actions/cache@v2
4247
with:
@@ -60,6 +65,7 @@ jobs:
6065
echo app dir ${{ github.event.inputs.app_dir }}
6166
echo CLI_JAVA_DIR "${{ github.event.inputs.cli_java_dir }}"
6267
echo CLI_RES_DIR "${{ github.event.inputs.cli_res_dir }}"
68+
echo CLI_ASSETS_DIR "${{ github.event.inputs.cli_assets_dir }}"
6369
echo APPLICATION_ID "${{ github.event.inputs.application_id }}"
6470
6571
- name: build
@@ -71,6 +77,7 @@ jobs:
7177
CLI_APP_DIR: "${{ github.event.inputs.app_dir }}"
7278
CLI_JAVA_DIR: "${{ github.event.inputs.cli_java_dir }}"
7379
CLI_RES_DIR: "${{ github.event.inputs.cli_res_dir }}"
80+
CLI_ASSETS_DIR: "${{ github.event.inputs.cli_assets_dir }}"
7481
APPLICATION_ID: "${{ github.event.inputs.application_id }}"
7582

7683
- name: Environment info
@@ -90,5 +97,3 @@ jobs:
9097
# with:
9198
# name: openimis-claims-aab-${{github.run_number}}-${{github.sha}}
9299
# path: ./claimManagement/build/outputs/**/*.aab
93-
94-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ out/
1616
# Gradle files
1717
.gradle/
1818
build/
19-
release/
2019

2120
# Local configuration file (sdk path, etc)
2221
local.properties

app/build.gradle

Lines changed: 48 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import java.time.LocalDateTime
22
import java.time.format.DateTimeFormatter
33

44
apply plugin: 'com.android.application'
5+
apply plugin: "org.ajoberstar.grgit"
56
apply from: "$project.rootDir/script-git-version.gradle"
6-
apply plugin: 'com.android.application'
77

88
// Load keystore
99
def keystorePropertiesFile = file("keystore.properties")
1010
def keystoreProperties = new Properties()
11-
if ( keystorePropertiesFile.exists() ) {
11+
if (keystorePropertiesFile.exists()) {
1212
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
1313
}
1414

@@ -20,9 +20,9 @@ static def getDate() {
2020
}
2121

2222
android {
23-
compileSdkVersion 30
24-
buildToolsVersion '30.0.3'
25-
if ( keystorePropertiesFile.exists() ) {
23+
compileSdkVersion 33
24+
buildToolsVersion '33.0.0'
25+
if (keystorePropertiesFile.exists()) {
2626
signingConfigs {
2727
releaseConfig {
2828
storeFile file(keystoreProperties['storeFile'])
@@ -35,11 +35,10 @@ android {
3535
defaultConfig {
3636
applicationId "org.openimis.imispolicies"
3737
minSdkVersion 19
38-
targetSdkVersion 30
38+
targetSdkVersion 33
3939
versionCode gitVersionCode
4040
versionName gitVersionName
4141
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42-
useLibrary('org.apache.http.legacy')
4342
vectorDrawables {
4443
useSupportLibrary = true
4544
}
@@ -50,14 +49,23 @@ android {
5049
shrinkResources false
5150
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
5251
debuggable = false
53-
if ( keystorePropertiesFile.exists() ) {
52+
if (keystorePropertiesFile.exists()) {
5453
signingConfig signingConfigs.releaseConfig
5554
}
56-
buildConfigField "boolean", "LOG", "false"
55+
buildConfigField "boolean", "LOGGING_ENABLED", "false"
56+
57+
// Refer to https://developer.android.com/reference/android/util/Log for the log level values
58+
// Irrelevant if LOGGING_ENABLED = false
59+
buildConfigField "int", "CONSOLE_LOG_LEVEL", '8' //Assert
60+
buildConfigField "int", "FILE_LOG_LEVEL", '8' //Assert
5761
}
5862
debug {
5963
debuggable = true
60-
buildConfigField "boolean", "LOG", "true"
64+
buildConfigField "boolean", "LOGGING_ENABLED", "true"
65+
66+
// Refer to https://developer.android.com/reference/android/util/Log for the log level values
67+
buildConfigField "int", "CONSOLE_LOG_LEVEL", '2' //Verbose
68+
buildConfigField "int", "FILE_LOG_LEVEL", '5' //Warn
6169
}
6270
flavorDimensions 'std'
6371
}
@@ -68,98 +76,70 @@ android {
6876
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'false'
6977
buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
7078
buildConfigField "String", "API_VERSION", '"3"'
71-
buildConfigField "String", "APP_DIR", '"IMIS"'
79+
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en"'
7280
resValue "string", "app_name_policies", "Policies"
7381
resValue "string", "ReleaseDateValue", getDate()
7482
}
7583
productFlavors {
7684
demoProd {
7785
applicationId "org.openimis.imispolicies.demoProd"
7886
buildConfigField "String", "API_BASE_URL", '"https://demo.openimis.org/rest/"'
79-
buildConfigField "String", "APP_DIR", '"IMIS-DEMOPROD"'
8087
resValue "string", "app_name_policies", "Policies Demo"
8188
dimension = 'std'
8289
}
83-
8490
demoRelease {
8591
applicationId "org.openimis.imispolicies.demoRelease"
8692
buildConfigField "String", "API_BASE_URL", '"https://release.openimis.org/rest/"'
87-
buildConfigField "String", "APP_DIR", '"IMIS-DEMORELEASE"'
8893
resValue "string", "app_name_policies", "Policies Release"
94+
dimension = 'std'
8995
}
90-
9196
chfDev {
9297
applicationId "org.openimis.imispolicies.chfdev"
9398
buildConfigField "String", "API_BASE_URL", '"http://chf-dev.swisstph-mis.ch/rest/"'
9499
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
95100
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
96-
buildConfigField "String", "APP_DIR", '"IMIS-CHFDEV"'
101+
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en-tz"'
97102
resValue "string", "app_name_policies", "Policies CHF DEV"
98103
dimension = 'std'
99104
}
100-
101-
chfProd {
102-
applicationId "org.openimis.imispolicies.chf"
103-
buildConfigField "String", "API_BASE_URL", '"http://chf-imis.or.tz/restapi/"'
104-
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'false'
105-
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
106-
buildConfigField "String", "APP_DIR", '"IMIS-CHFPROD"'
107-
resValue "string", "app_name_policies", "Policies CHF"
108-
dimension = 'std'
109-
}
110-
111105
mvDev {
112106
applicationId "org.openimis.imispolicies.mv"
113107
buildConfigField "String", "API_BASE_URL", '"http://imis-mv.swisstph-mis.ch/rest/"'
114108
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
115-
buildConfigField "String", "APP_DIR", '"IMIS-MVDEV"'
116109
buildConfigField "String", "API_VERSION", '"3"'
117110
resValue "string", "app_name_policies", "Policies MV DEV"
118111
dimension = 'std'
119112
}
120113
bephaDev {
121114
applicationId "org.openimis.imispolicies.bepha"
122115
buildConfigField "String", "API_BASE_URL", '"http://149.210.235.40/devupgrade/rest/"'
123-
buildConfigField "String", "APP_DIR", '"IMIS-BEPHADEV"'
116+
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en-cm"'
124117
resValue "string", "app_name_policies", "Policies BEPHA DEV"
125118
dimension = 'std'
126119
}
127120
tchadDev {
128121
applicationId "org.openimis.imispolicies.tchadDev"
129122
buildConfigField "String", "API_BASE_URL", '"http://imis-tchad-dev.swisstph-mis.ch/rest/"'
130-
buildConfigField "String", "APP_DIR", '"IMIS-TCHADDEV"'
131123
resValue "string", "app_name_policies", "Policies TCHAD DEV"
132124
dimension = 'std'
133125
}
134126
local {
135127
applicationId "org.openimis.imispolicies.local"
136128
buildConfigField "String", "API_BASE_URL", '"http://10.0.2.2:35787/"'
137-
buildConfigField "String", "APP_DIR", '"IMIS-LOCAL"'
138129
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
139130
resValue "string", "app_name_policies", "Policies Local"
140131
dimension = 'std'
141132
versionCode = gitVersionCodeTime
142133
}
143-
chfsit {
144-
applicationId "org.openimis.imispolicies.chfsit"
145-
buildConfigField "String", "API_BASE_URL", '"http://196.192.73.26/restapi/"'
146-
buildConfigField "String", "APP_DIR", '"IMIS-CHFSIT"'
147-
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
148-
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
149-
resValue "string", "app_name_policies", "Policies CHF SIT"
150-
}
151134
niger {
152-
print("Building niger flavour" + "API_BASE_URL" + '"' + (System.getenv("API_BASE_URL") ?: 'http://192.168.0.100/') + '"')
153-
print("App name: " + System.getenv("CLI_APP_NAME") ?: "Polices Niger")
154135
applicationId "org.openimis.imispolicies.niger"
155136
buildConfigField "String", "API_BASE_URL", '"' + (System.getenv("API_BASE_URL") ?: 'http://192.168.0.100/') + '"'
156-
buildConfigField "String", "APP_DIR", '"' + (System.getenv("CLI_APP_DIR") ?: 'IMIS-POL') + '"'
157137
resValue "string", "app_name_policies", System.getenv("CLI_APP_NAME") ?: "Polices Niger"
138+
dimension = 'std'
158139
}
159140
cli {
160141
applicationIdSuffix System.getenv("APPLICATION_ID") ?: "org.openimis.imispolicies.cli"
161142
buildConfigField "String", "API_BASE_URL", '"' + (System.getenv("API_BASE_URL") ?: 'http://10.0.2.2:35787/') + '"'
162-
buildConfigField "String", "APP_DIR", '"' + (System.getenv("CLI_APP_DIR") ?: 'IMIS-CLI') + '"'
163143
resValue "string", "app_name_policies", System.getenv("CLI_APP_NAME") ?: "Policies CLI"
164144
dimension 'std'
165145
}
@@ -168,74 +148,77 @@ android {
168148
buildConfigField "String", "API_BASE_URL", '"https://formation.cnass-mauritanie.swisstph-mis.ch/rest/"'
169149
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'false'
170150
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'false'
171-
buildConfigField "String", "APP_DIR", '"IMIS-MAURITANIA-TRAIN"'
172151
resValue "string", "app_name_policies", "Policies CNASS TRAIN"
173152
dimension = 'std'
174153
}
175154
}
176155
sourceSets {
177156
chfDev.java.srcDir 'src/chf/java'
178-
chfDev.res.srcDir 'src/chf/res'
179-
180-
chfProd.java.srcDir 'src/chf/java'
181-
chfProd.res.srcDir 'src/chf/res'
182-
183-
chfsit.java.srcDir 'src/chf/java'
184-
chfsit.res.srcDir 'src/chf/res'
157+
chfDev.res.srcDirs = ['src/chf/res', 'src/localeChf/res']
185158

186159
mvDev.java.srcDir 'src/master/java'
187-
mvDev.res.srcDirs 'src/master/res'
160+
mvDev.res.srcDirs = ['src/master/res', 'src/localeMv/res']
188161

189162
local.java.srcDir 'src/master/java'
190-
local.res.srcDir 'src/master/res'
163+
local.res.srcDirs = ['src/master/res', 'src/localeMv/res']
191164

192165
bephaDev.java.srcDir 'src/bepha/java'
193-
bephaDev.res.srcDir 'src/bepha/res'
166+
bephaDev.res.srcDirs = ['src/bepha/res', 'src/localeBepha/res']
194167

195168
niger.java.srcDir 'src/niger/java'
196169
niger.res.srcDir 'src/niger/res'
170+
niger.assets.srcDir 'src/niger/assets'
197171

198172
tchadDev.java.srcDir 'src/tchad/java'
199173
tchadDev.res.srcDir 'src/tchad/res'
200174

201175
demoProd.java.srcDir 'src/master/java'
202-
demoProd.res.srcDir 'src/demoProd/res'
176+
demoProd.res.srcDirs = ['src/demoProd/res', 'src/localeMv/res']
203177

204178
demoRelease.java.srcDir 'src/master/java'
205-
demoRelease.res.srcDir 'src/demoRelease/res'
179+
demoRelease.res.srcDirs = ['src/demoRelease/res', 'src/localeMv/res']
206180

207181
cli.java.srcDir System.getenv("CLI_JAVA_DIR") ?: 'src/master/java'
208182
cli.res.srcDir System.getenv("CLI_RES_DIR") ?: 'src/demoProd/res'
183+
if (System.getenv("CLI_ASSETS_DIR")) {
184+
cli.assets.srcDir System.getenv("CLI_ASSETS_DIR")
185+
}
209186

210187
mauritaniaTrain.java.srcDir 'src/master/java'
211188
}
212189

213-
// Apply custom flavours
214-
if(file('custom-flavours.gradle').exists()){
190+
// Apply custom flavours
191+
if (file('custom-flavours.gradle').exists()) {
215192
apply from: 'custom-flavours.gradle'
216193
}
217194

218195
compileOptions {
219-
sourceCompatibility JavaVersion.VERSION_1_8
220-
targetCompatibility JavaVersion.VERSION_1_8
196+
sourceCompatibility JavaVersion.VERSION_11
197+
targetCompatibility JavaVersion.VERSION_11
198+
}
199+
200+
packagingOptions {
201+
resources {
202+
excludes += ['META-INF/DEPENDENCIES']
203+
}
221204
}
222205
}
223206

224207
dependencies {
225-
implementation fileTree(include: ['*.jar','*.aar'], dir: 'libs')
208+
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
226209
implementation 'com.android.support:appcompat-v7:28.0.0'
227210
implementation 'com.android.support:design:28.0.0'
228211
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
229-
implementation 'com.squareup.picasso:picasso:2.5.2'
212+
implementation 'com.squareup.picasso:picasso:2.71828'
230213
implementation 'commons-io:commons-io:2.11.0'
231214
implementation 'com.android.support:support-v4:28.0.0'
232215
implementation 'com.android.support:recyclerview-v7:28.0.0'
233216
implementation 'org.apache.commons:commons-lang3:3.12.0'
234-
217+
implementation 'org.jetbrains:annotations:15.0'
218+
implementation 'cz.msebera.android:httpclient:4.5.8'
235219

236220
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
237221
exclude group: 'com.android.support', module: 'support-annotations'
238222
})
239-
testImplementation 'junit:junit:4.12'
240-
//compile 'com.android.support:support-annotations:27.1.1'
223+
testImplementation 'junit:junit:4.13.2'
241224
}

app/custom-flavours.gradle.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ android {
66
buildConfigField "String", "API_BASE_URL", [API_BASE_URL]
77
buildConfigField "boolean", "SHOW_PAYMENT_MENU", [SHOW_PAYMENT_MENU]
88
buildConfigField "boolean", "SHOW_BULK_CN_MENU", [SHOW_BULK_CN_MENU]
9-
buildConfigField "String", "APP_DIR", [APP_DIR_NAME]
109
buildConfigField "String", "API_VERSION", [API_VERSION]
1110
buildConfigField "String", "RAR_PASSWORD", [RAR_PASSWORD]
1211
resValue "string", "app_name_policies", [APP_NAME]

0 commit comments

Comments
 (0)