Skip to content

Commit

Permalink
Finish release/2.2.0
Browse files Browse the repository at this point in the history
Release/2.2.0
  • Loading branch information
dragos-dobre authored Nov 15, 2022
2 parents 099bb73 + 2195843 commit cd6dc1f
Show file tree
Hide file tree
Showing 80 changed files with 5,460 additions and 3,523 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup JDK 1.8
uses: actions/setup-java@v1
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'temurin'
java-version: '11'
cache: 'gradle'

- name: Environment info
run: |
Expand Down Expand Up @@ -48,5 +50,3 @@ jobs:
with:
name: openimis-policies-aab-${{github.run_number}}-${{github.sha}}
path: ./app/build/outputs/**/*.aab


15 changes: 10 additions & 5 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ on:
cli_res_dir:
description: Resources folder for icons. Only works with application_id_suffix .cli
required: false
cli_assets_dir:
description: Asserts folder for images, json files.... Only works with .cli
required: false
# Branch is chosen by default in github manual actions

jobs:
Expand All @@ -33,10 +36,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup JDK 1.8
uses: actions/setup-java@v1
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'temurin'
java-version: '11'
cache: 'gradle'

- uses: actions/cache@v2
with:
Expand All @@ -60,6 +65,7 @@ jobs:
echo app dir ${{ github.event.inputs.app_dir }}
echo CLI_JAVA_DIR "${{ github.event.inputs.cli_java_dir }}"
echo CLI_RES_DIR "${{ github.event.inputs.cli_res_dir }}"
echo CLI_ASSETS_DIR "${{ github.event.inputs.cli_assets_dir }}"
echo APPLICATION_ID "${{ github.event.inputs.application_id }}"
- name: build
Expand All @@ -71,6 +77,7 @@ jobs:
CLI_APP_DIR: "${{ github.event.inputs.app_dir }}"
CLI_JAVA_DIR: "${{ github.event.inputs.cli_java_dir }}"
CLI_RES_DIR: "${{ github.event.inputs.cli_res_dir }}"
CLI_ASSETS_DIR: "${{ github.event.inputs.cli_assets_dir }}"
APPLICATION_ID: "${{ github.event.inputs.application_id }}"

- name: Environment info
Expand All @@ -90,5 +97,3 @@ jobs:
# with:
# name: openimis-claims-aab-${{github.run_number}}-${{github.sha}}
# path: ./claimManagement/build/outputs/**/*.aab


1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ out/
# Gradle files
.gradle/
build/
release/

# Local configuration file (sdk path, etc)
local.properties
Expand Down
113 changes: 48 additions & 65 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

apply plugin: 'com.android.application'
apply plugin: "org.ajoberstar.grgit"
apply from: "$project.rootDir/script-git-version.gradle"
apply plugin: 'com.android.application'

// Load keystore
def keystorePropertiesFile = file("keystore.properties")
def keystoreProperties = new Properties()
if ( keystorePropertiesFile.exists() ) {
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

Expand All @@ -20,9 +20,9 @@ static def getDate() {
}

android {
compileSdkVersion 30
buildToolsVersion '30.0.3'
if ( keystorePropertiesFile.exists() ) {
compileSdkVersion 33
buildToolsVersion '33.0.0'
if (keystorePropertiesFile.exists()) {
signingConfigs {
releaseConfig {
storeFile file(keystoreProperties['storeFile'])
Expand All @@ -35,11 +35,10 @@ android {
defaultConfig {
applicationId "org.openimis.imispolicies"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode gitVersionCode
versionName gitVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
useLibrary('org.apache.http.legacy')
vectorDrawables {
useSupportLibrary = true
}
Expand All @@ -50,14 +49,23 @@ android {
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable = false
if ( keystorePropertiesFile.exists() ) {
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.releaseConfig
}
buildConfigField "boolean", "LOG", "false"
buildConfigField "boolean", "LOGGING_ENABLED", "false"

// Refer to https://developer.android.com/reference/android/util/Log for the log level values
// Irrelevant if LOGGING_ENABLED = false
buildConfigField "int", "CONSOLE_LOG_LEVEL", '8' //Assert
buildConfigField "int", "FILE_LOG_LEVEL", '8' //Assert
}
debug {
debuggable = true
buildConfigField "boolean", "LOG", "true"
buildConfigField "boolean", "LOGGING_ENABLED", "true"

// Refer to https://developer.android.com/reference/android/util/Log for the log level values
buildConfigField "int", "CONSOLE_LOG_LEVEL", '2' //Verbose
buildConfigField "int", "FILE_LOG_LEVEL", '5' //Warn
}
flavorDimensions 'std'
}
Expand All @@ -68,98 +76,70 @@ android {
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'false'
buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
buildConfigField "String", "API_VERSION", '"3"'
buildConfigField "String", "APP_DIR", '"IMIS"'
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en"'
resValue "string", "app_name_policies", "Policies"
resValue "string", "ReleaseDateValue", getDate()
}
productFlavors {
demoProd {
applicationId "org.openimis.imispolicies.demoProd"
buildConfigField "String", "API_BASE_URL", '"https://demo.openimis.org/rest/"'
buildConfigField "String", "APP_DIR", '"IMIS-DEMOPROD"'
resValue "string", "app_name_policies", "Policies Demo"
dimension = 'std'
}

demoRelease {
applicationId "org.openimis.imispolicies.demoRelease"
buildConfigField "String", "API_BASE_URL", '"https://release.openimis.org/rest/"'
buildConfigField "String", "APP_DIR", '"IMIS-DEMORELEASE"'
resValue "string", "app_name_policies", "Policies Release"
dimension = 'std'
}

chfDev {
applicationId "org.openimis.imispolicies.chfdev"
buildConfigField "String", "API_BASE_URL", '"http://chf-dev.swisstph-mis.ch/rest/"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
buildConfigField "String", "APP_DIR", '"IMIS-CHFDEV"'
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en-tz"'
resValue "string", "app_name_policies", "Policies CHF DEV"
dimension = 'std'
}

chfProd {
applicationId "org.openimis.imispolicies.chf"
buildConfigField "String", "API_BASE_URL", '"http://chf-imis.or.tz/restapi/"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'false'
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
buildConfigField "String", "APP_DIR", '"IMIS-CHFPROD"'
resValue "string", "app_name_policies", "Policies CHF"
dimension = 'std'
}

mvDev {
applicationId "org.openimis.imispolicies.mv"
buildConfigField "String", "API_BASE_URL", '"http://imis-mv.swisstph-mis.ch/rest/"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
buildConfigField "String", "APP_DIR", '"IMIS-MVDEV"'
buildConfigField "String", "API_VERSION", '"3"'
resValue "string", "app_name_policies", "Policies MV DEV"
dimension = 'std'
}
bephaDev {
applicationId "org.openimis.imispolicies.bepha"
buildConfigField "String", "API_BASE_URL", '"http://149.210.235.40/devupgrade/rest/"'
buildConfigField "String", "APP_DIR", '"IMIS-BEPHADEV"'
buildConfigField "String", "DEFAULT_LANGUAGE_CODE", '"en-cm"'
resValue "string", "app_name_policies", "Policies BEPHA DEV"
dimension = 'std'
}
tchadDev {
applicationId "org.openimis.imispolicies.tchadDev"
buildConfigField "String", "API_BASE_URL", '"http://imis-tchad-dev.swisstph-mis.ch/rest/"'
buildConfigField "String", "APP_DIR", '"IMIS-TCHADDEV"'
resValue "string", "app_name_policies", "Policies TCHAD DEV"
dimension = 'std'
}
local {
applicationId "org.openimis.imispolicies.local"
buildConfigField "String", "API_BASE_URL", '"http://10.0.2.2:35787/"'
buildConfigField "String", "APP_DIR", '"IMIS-LOCAL"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
resValue "string", "app_name_policies", "Policies Local"
dimension = 'std'
versionCode = gitVersionCodeTime
}
chfsit {
applicationId "org.openimis.imispolicies.chfsit"
buildConfigField "String", "API_BASE_URL", '"http://196.192.73.26/restapi/"'
buildConfigField "String", "APP_DIR", '"IMIS-CHFSIT"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'true'
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'true'
resValue "string", "app_name_policies", "Policies CHF SIT"
}
niger {
print("Building niger flavour" + "API_BASE_URL" + '"' + (System.getenv("API_BASE_URL") ?: 'http://192.168.0.100/') + '"')
print("App name: " + System.getenv("CLI_APP_NAME") ?: "Polices Niger")
applicationId "org.openimis.imispolicies.niger"
buildConfigField "String", "API_BASE_URL", '"' + (System.getenv("API_BASE_URL") ?: 'http://192.168.0.100/') + '"'
buildConfigField "String", "APP_DIR", '"' + (System.getenv("CLI_APP_DIR") ?: 'IMIS-POL') + '"'
resValue "string", "app_name_policies", System.getenv("CLI_APP_NAME") ?: "Polices Niger"
dimension = 'std'
}
cli {
applicationIdSuffix System.getenv("APPLICATION_ID") ?: "org.openimis.imispolicies.cli"
buildConfigField "String", "API_BASE_URL", '"' + (System.getenv("API_BASE_URL") ?: 'http://10.0.2.2:35787/') + '"'
buildConfigField "String", "APP_DIR", '"' + (System.getenv("CLI_APP_DIR") ?: 'IMIS-CLI') + '"'
resValue "string", "app_name_policies", System.getenv("CLI_APP_NAME") ?: "Policies CLI"
dimension 'std'
}
Expand All @@ -168,74 +148,77 @@ android {
buildConfigField "String", "API_BASE_URL", '"https://formation.cnass-mauritanie.swisstph-mis.ch/rest/"'
buildConfigField "boolean", "SHOW_PAYMENT_MENU", 'false'
buildConfigField "boolean", "SHOW_BULK_CN_MENU", 'false'
buildConfigField "String", "APP_DIR", '"IMIS-MAURITANIA-TRAIN"'
resValue "string", "app_name_policies", "Policies CNASS TRAIN"
dimension = 'std'
}
}
sourceSets {
chfDev.java.srcDir 'src/chf/java'
chfDev.res.srcDir 'src/chf/res'

chfProd.java.srcDir 'src/chf/java'
chfProd.res.srcDir 'src/chf/res'

chfsit.java.srcDir 'src/chf/java'
chfsit.res.srcDir 'src/chf/res'
chfDev.res.srcDirs = ['src/chf/res', 'src/localeChf/res']

mvDev.java.srcDir 'src/master/java'
mvDev.res.srcDirs 'src/master/res'
mvDev.res.srcDirs = ['src/master/res', 'src/localeMv/res']

local.java.srcDir 'src/master/java'
local.res.srcDir 'src/master/res'
local.res.srcDirs = ['src/master/res', 'src/localeMv/res']

bephaDev.java.srcDir 'src/bepha/java'
bephaDev.res.srcDir 'src/bepha/res'
bephaDev.res.srcDirs = ['src/bepha/res', 'src/localeBepha/res']

niger.java.srcDir 'src/niger/java'
niger.res.srcDir 'src/niger/res'
niger.assets.srcDir 'src/niger/assets'

tchadDev.java.srcDir 'src/tchad/java'
tchadDev.res.srcDir 'src/tchad/res'

demoProd.java.srcDir 'src/master/java'
demoProd.res.srcDir 'src/demoProd/res'
demoProd.res.srcDirs = ['src/demoProd/res', 'src/localeMv/res']

demoRelease.java.srcDir 'src/master/java'
demoRelease.res.srcDir 'src/demoRelease/res'
demoRelease.res.srcDirs = ['src/demoRelease/res', 'src/localeMv/res']

cli.java.srcDir System.getenv("CLI_JAVA_DIR") ?: 'src/master/java'
cli.res.srcDir System.getenv("CLI_RES_DIR") ?: 'src/demoProd/res'
if (System.getenv("CLI_ASSETS_DIR")) {
cli.assets.srcDir System.getenv("CLI_ASSETS_DIR")
}

mauritaniaTrain.java.srcDir 'src/master/java'
}

// Apply custom flavours
if(file('custom-flavours.gradle').exists()){
// Apply custom flavours
if (file('custom-flavours.gradle').exists()) {
apply from: 'custom-flavours.gradle'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

packagingOptions {
resources {
excludes += ['META-INF/DEPENDENCIES']
}
}
}

dependencies {
implementation fileTree(include: ['*.jar','*.aar'], dir: 'libs')
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'

implementation 'org.jetbrains:annotations:15.0'
implementation 'cz.msebera.android:httpclient:4.5.8'

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
//compile 'com.android.support:support-annotations:27.1.1'
testImplementation 'junit:junit:4.13.2'
}
1 change: 0 additions & 1 deletion app/custom-flavours.gradle.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ android {
buildConfigField "String", "API_BASE_URL", [API_BASE_URL]
buildConfigField "boolean", "SHOW_PAYMENT_MENU", [SHOW_PAYMENT_MENU]
buildConfigField "boolean", "SHOW_BULK_CN_MENU", [SHOW_BULK_CN_MENU]
buildConfigField "String", "APP_DIR", [APP_DIR_NAME]
buildConfigField "String", "API_VERSION", [API_VERSION]
buildConfigField "String", "RAR_PASSWORD", [RAR_PASSWORD]
resValue "string", "app_name_policies", [APP_NAME]
Expand Down
Loading

0 comments on commit cd6dc1f

Please sign in to comment.