Skip to content

Commit

Permalink
Merge pull request #631 from Orange-OpenSource/develop
Browse files Browse the repository at this point in the history
Release 0.15.0
  • Loading branch information
paulinea authored Sep 12, 2023
2 parents ce3b11e + c0c7805 commit 9f7ecce
Show file tree
Hide file tree
Showing 403 changed files with 8,317 additions and 2,582 deletions.
2 changes: 1 addition & 1 deletion .github/actions/app-distribution/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
BRANCH_SHA=${{ github.event.pull_request.head.sha }}
COMMIT_SHA=${BRANCH_SHA:-$GITHUB_SHA}
[ ${{ inputs.append-git-sha-to-version-name }} == 'true' ] && VERSION_NAME_SUFFIX=-${COMMIT_SHA::7} || VERSION_NAME_SUFFIX=''
./gradlew app:appDistributionUpload -PversionNameSuffix=$VERSION_NAME_SUFFIX -PversionCode=$GITHUB_RUN_NUMBER -PappDistributionVariants=release -PappDistributionGitTagPrefix=${{ inputs.git-tag-prefix }} -PappDistributionGroup=${{ inputs.group }} -PappDistributionGitTagSha=$COMMIT_SHA --stacktrace
./gradlew app:appDistributionUpload -PversionNameSuffix=$VERSION_NAME_SUFFIX -PversionCode=$GITHUB_RUN_NUMBER -PappDistributionVariants=qualifRelease -PappDistributionGitTagPrefix=${{ inputs.git-tag-prefix }} -PappDistributionGroup=${{ inputs.group }} -PappDistributionGitTagSha=$COMMIT_SHA --stacktrace
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
FIREBASE_TOKEN: ${{ inputs.firebase-token }}
14 changes: 7 additions & 7 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up signing configuration
uses: ./.github/actions/setup-signing
Expand All @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: app
path: app/build/outputs/apk/*/*.apk
path: app/build/outputs/apk/*/*/*.apk

- name: Store lib artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up signing configuration
uses: ./.github/actions/setup-signing
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up signing configuration
uses: ./.github/actions/setup-signing
Expand Down Expand Up @@ -163,17 +163,17 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Publish release to Google Play Store
run: |
./gradlew assembleRelease bundleRelease
curl -F 'file=@app/build/outputs/bundle/release/app-release.aab' https://oma-portal.orange.fr/oma/api/v1/external/applications/${{ secrets.OMA_APP_ID }}/artifacts -H "apiKey:${{ secrets.OMA_APP_TOKEN }}"
curl -F 'file=@app/build/outputs/bundle/prodRelease/app-prod-release.aab' https://oma-portal.orange.fr/oma/api/v1/external/applications/${{ secrets.OMA_APP_ID }}/artifacts -H "apiKey:${{ secrets.OMA_APP_TOKEN }}"
- name: Store Google Play Store artifacts
uses: actions/upload-artifact@v3
with:
name: google-play-store
path: |
app/build/outputs/apk/*/*.apk
app/build/outputs/apk/*/*/*.apk
app/build/outputs/bundle/*/*.aab
2 changes: 1 addition & 1 deletion .github/workflows/app-distribution-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up signing configuration
uses: ./.github/actions/setup-signing
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build with Jekyll
run: |
cd docs
bundle config set --local path 'vendor/bundle'
bundle install
bundle exec jekyll build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs/_site

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {

```groovy
dependencies {
implementation 'com.orange.ods.android:ods-lib:0.14.0'
implementation 'com.orange.ods.android:ods-lib:0.15.0'
}
```

Expand Down
67 changes: 38 additions & 29 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,24 @@ plugins {
id("com.android.application")
id("com.google.gms.google-services")
id("kotlin-android")
id("kotlin-kapt")
id("kotlin-parcelize")
id("com.google.firebase.appdistribution")
id("com.google.firebase.crashlytics")
id("firebase")
id("dagger.hilt.android.plugin")
id("kotlin-kapt") // This must be the last statement in the plugins {} to avoid "options not recognized" warning
}

android {
namespace = "com.orange.ods.app"

compileSdk = Versions.compileSdk

defaultConfig {
applicationId = "com.orange.ods.app"
minSdk = Versions.minSdk
targetSdk = Versions.targetSdk
val versionCodeProperty = project.findTypedProperty<String>("versionCode")
versionCode = versionCodeProperty?.toInt() ?: 5
versionCode = versionCodeProperty?.toInt() ?: 6
versionName = version.toString()
val versionNameSuffixProperty = project.findTypedProperty<String>("versionNameSuffix")
versionNameSuffix = versionNameSuffixProperty
Expand Down Expand Up @@ -74,6 +75,20 @@ android {
}
}

val versionFlavorDimension = "version"
flavorDimensions.add(versionFlavorDimension)
productFlavors {
create("qualif") {
dimension = versionFlavorDimension
applicationId = "com.orange.ods.test.app"
}

create("prod") {
dimension = versionFlavorDimension
applicationId = "com.orange.ods.app"
}
}

firebaseAppDistribution {
releaseNotesFile = Firebase_gradle.AppDistribution.releaseNotesFilePath
groups = project.findTypedProperty("appDistributionGroup")
Expand All @@ -91,16 +106,17 @@ android {
}

buildFeatures {
buildConfig = true
compose = true
viewBinding = true
dataBinding = true
}

composeOptions {
kotlinCompilerExtensionVersion = Versions.compose
kotlinCompilerExtensionVersion = Versions.composeCompiler
}

packagingOptions {
packaging {
with(resources.excludes) {
add("/META-INF/{AL2.0,LGPL2.1}")
}
Expand All @@ -112,38 +128,31 @@ dependencies {
implementation(project(":lib-xml"))
implementation(project(":theme-innovation-cup"))

implementation(Dependencies.composeMaterial3)
implementation(Dependencies.coreKtx)
implementation(Dependencies.kotlinReflect)
implementation(Dependencies.accompanistFlowLayout)
implementation(Dependencies.accompanistSystemUiController)
implementation(Dependencies.activityCompose)
implementation(Dependencies.appCompat)
implementation(Dependencies.material)
implementation(Dependencies.browser)
implementation(Dependencies.coil)
implementation(Dependencies.coilCompose)
implementation(platform(Dependencies.composeBom))
implementation(Dependencies.composeMaterial3)
implementation(Dependencies.composeUi)
implementation(Dependencies.lifecycleViewModelKtx)
implementation(Dependencies.composeUiTooling)
implementation(Dependencies.composeUiToolingPreview)
implementation(Dependencies.lifecycleRuntimeKtx)
implementation(Dependencies.activityCompose)
implementation(Dependencies.navigationCompose)
implementation(Dependencies.accompanistSystemUiController)
implementation(Dependencies.accompanistPager)
implementation(Dependencies.accompanistPagerIndicators)
implementation(Dependencies.accompanistFlowLayout)
implementation(Dependencies.coreKtx)
implementation(Dependencies.dataStorePreferences)
implementation(platform(Dependencies.firebaseBom))
implementation(Dependencies.firebaseCrashlytics)
implementation(Dependencies.webkit)
implementation(Dependencies.browser)
implementation(Dependencies.hiltAndroid)
kapt(Dependencies.hiltCompiler)
implementation(Dependencies.dataStorePreferences)
implementation(Dependencies.coil)
implementation(Dependencies.coilCompose)
implementation(Dependencies.kotlinReflect)
implementation(Dependencies.lifecycleRuntimeKtx)
implementation(Dependencies.lifecycleViewModelKtx)
implementation(Dependencies.material)
implementation(Dependencies.navigationCompose)
implementation(Dependencies.timber)

debugImplementation(Dependencies.composeUiTooling)
}

// Allow references to generated code
kapt {
correctErrorTypes = true
implementation(Dependencies.webkit)
}

tasks.register<Copy>("copyChangelog") {
Expand Down
58 changes: 58 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,64 @@
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:212698857200:android:67d1403d02a72f4d5ecc35",
"android_client_info": {
"package_name": "com.orange.ods.test.app"
}
},
"oauth_client": [
{
"client_id": "212698857200-mvqaopuseqhqeaglk7jm0g8qg0dcvsab.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAIY6bMaglXBkcA72v_vja3yI6-7uaR-8U"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "212698857200-mvqaopuseqhqeaglk7jm0g8qg0dcvsab.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:212698857200:android:92978ae61c91c8b85ecc35",
"android_client_info": {
"package_name": "com.orange.ods.test.flutterapp"
}
},
"oauth_client": [
{
"client_id": "212698857200-mvqaopuseqhqeaglk7jm0g8qg0dcvsab.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAIY6bMaglXBkcA72v_vja3yI6-7uaR-8U"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "212698857200-mvqaopuseqhqeaglk7jm0g8qg0dcvsab.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
~ * https://opensource.org/licenses/MIT.
~ */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.orange.ods.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".OdsApplication"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/com/orange/ods/app/ui/MainBottomNavigation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ package com.orange.ods.app.ui

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import androidx.compose.material.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
Expand All @@ -31,19 +30,20 @@ import com.orange.ods.app.ui.modules.ModulesScreen
import com.orange.ods.app.ui.utilities.launchUrl
import com.orange.ods.compose.component.bottomnavigation.OdsBottomNavigation
import com.orange.ods.compose.component.bottomnavigation.OdsBottomNavigationItem
import com.orange.ods.compose.component.bottomnavigation.OdsBottomNavigationItemIcon

@Composable
fun MainBottomNavigation(items: Array<BottomNavigationSections>, currentRoute: String, navigateToRoute: (String) -> Unit) {
OdsBottomNavigation {
items.forEach { item ->
OdsBottomNavigation(
items = items.map { item ->
OdsBottomNavigationItem(
icon = { Icon(painter = painterResource(id = item.iconRes), contentDescription = null) },
icon = OdsBottomNavigationItemIcon(painter = painterResource(id = item.iconRes), contentDescription = ""),
label = stringResource(id = item.titleRes),
selected = currentRoute == item.route,
onClick = { navigateToRoute(item.route) }
)
}
}
)
}

fun NavGraphBuilder.addBottomNavigationGraph(navigateToElement: (String, Long?, NavBackStackEntry) -> Unit) {
Expand Down
Loading

0 comments on commit 9f7ecce

Please sign in to comment.