-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from reysand/feat/onedrive
Implement OneDrive integration
- Loading branch information
Showing
30 changed files
with
1,102 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ name: Android CI | |
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
branches: [ "master", "dev" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
branches: [ "master", "dev" ] | ||
|
||
jobs: | ||
build: | ||
|
@@ -13,14 +13,42 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4.0.0 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Generate auth_config_single_account.json | ||
run: | | ||
mkdir ./app/src/main/res/raw | ||
echo "${{ secrets.AUTH_CONFIG_SINGLE_ACCOUNT }}" > ./app/src/main/res/raw/auth_config_single_account.json | ||
- name: Generate secrets.properties | ||
run: | | ||
echo "${{ secrets.SECRETS_PROPERTIES }}" > ./secrets.properties | ||
- name: Generate keystore.properties | ||
run: | | ||
cat <<EOF > keystore.properties | ||
storeFile:${{ vars.KEYSTORE_STORE_FILE_PATH }} | ||
storePassword:${{ secrets.KEYSTORE_STORE_PASSWORD }} | ||
keyAlias:${{ secrets.KEYSTORE_KEY_ALIAS }} | ||
keyPassword:${{ secrets.KEYSTORE_KEY_PASSWORD }} | ||
EOF | ||
- name: Decode keystore and create jks | ||
run: | | ||
echo "${{ secrets.KEYSTORE_JKS }}" | base64 --decode > keystore.jks | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
run: ./gradlew assembleRelease | ||
|
||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: files | ||
path: ./app/build/outputs/apk/release/app-release.apk |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* | ||
* Copyright 2023 Andrey Slyusar | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import java.io.FileInputStream | ||
import java.util.Properties | ||
|
||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.kotlin.android) | ||
} | ||
|
||
val keystorePropertiesFile = rootProject.file("keystore.properties") | ||
val keystoreProperties = Properties() | ||
keystoreProperties.load(FileInputStream(keystorePropertiesFile)) | ||
|
||
val secretsPropertiesFile = rootProject.file("secrets.properties") | ||
val secretsProperties = Properties() | ||
secretsProperties.load(FileInputStream(secretsPropertiesFile)) | ||
|
||
android { | ||
namespace = "com.reysand.files" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.reysand.files" | ||
minSdk = 33 | ||
targetSdk = 34 | ||
versionCode = 3 | ||
versionName = "0.1.2" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
} | ||
|
||
signingConfigs { | ||
create("release") { | ||
storeFile = file(keystoreProperties["storeFile"] as String) | ||
storePassword = keystoreProperties["storePassword"] as String | ||
keyAlias = keystoreProperties["keyAlias"] as String | ||
keyPassword = keystoreProperties["keyPassword"] as String | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
manifestPlaceholders["signatureHash"] = secretsProperties["DEBUG_SIGNATURE_HASH"] as String | ||
} | ||
release { | ||
manifestPlaceholders["signatureHash"] = secretsProperties["RELEASE_SIGNATURE_HASH"] as String | ||
signingConfig = signingConfigs.getByName("release") | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.8" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(libs.core.ktx) | ||
implementation(libs.lifecycle.runtime.ktx) | ||
implementation(libs.activity.compose) | ||
|
||
implementation(platform(libs.compose.bom)) | ||
implementation(libs.ui) | ||
implementation(libs.ui.graphics) | ||
implementation(libs.ui.tooling.preview) | ||
implementation(libs.material3) | ||
implementation(libs.lifecycle.viewmodel.compose) | ||
implementation(libs.navigation.compose) | ||
|
||
implementation(libs.msal) { | ||
exclude(group = "io.opentelemetry") | ||
} | ||
implementation(libs.opentelemetry.api) | ||
implementation(libs.opentelemetry.context) | ||
|
||
implementation(libs.retrofit) | ||
implementation(libs.retrofit.gson) | ||
|
||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.test.ext.junit) | ||
androidTestImplementation(libs.espresso.core) | ||
androidTestImplementation(platform(libs.compose.bom)) | ||
androidTestImplementation(libs.ui.test.junit4) | ||
|
||
debugImplementation(libs.ui.tooling) | ||
debugImplementation(libs.ui.test.manifest) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.