Skip to content

Commit 24cf0de

Browse files
Revert "Mask API credentials (#64)"
This reverts commit 35c0b52.
1 parent f2e9f1d commit 24cf0de

File tree

15 files changed

+43
-115
lines changed

15 files changed

+43
-115
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ ktlint_code_style = intellij_idea
33
ktlint_function_naming_ignore_when_annotated_with=Composable
44
ktlint_standard_property-naming = disabled
55
ktlint_standard_filename = disabled
6-
ktlint_standard_discouraged-comment-location = disabled
7-
ktlint_standard_package-name = disabled
6+
ktlint_standard_discouraged-comment-location = disabled

.github/workflows/CompareScreenshot.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ concurrency:
1717

1818
permissions: {}
1919

20+
env:
21+
API_KEY: ${{ secrets.API_KEY }}
22+
API_SECRET: ${{ secrets.API_SECRET }}
23+
2024
jobs:
2125
compare-screenshot-test:
2226
runs-on: ubuntu-latest
@@ -41,19 +45,6 @@ jobs:
4145
with:
4246
gradle-version: wrapper
4347

44-
- name: Create debug keystore file
45-
run: |
46-
echo "$DEBUG_KEYSTORE" > debug.keystore.b64
47-
base64 -d -i debug.keystore.b64 > debug.keystore
48-
env:
49-
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
50-
51-
- name: Create API credentials
52-
run: |
53-
echo "$API_CREDENTIALS" > app/bytemask.properties.b64
54-
base64 -d -i app/bytemask.properties.b64 > app/bytemask.properties
55-
env:
56-
API_CREDENTIALS: ${{ secrets.API_CREDENTIALS }}
5748

5849
- uses: dawidd6/action-download-artifact@v6
5950
continue-on-error: true

.github/workflows/StoreScreenshot.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ concurrency:
1717

1818
permissions: {}
1919

20+
env:
21+
API_KEY: ${{ secrets.API_KEY }}
22+
API_SECRET: ${{ secrets.API_SECRET }}
23+
2024
jobs:
2125
store-screenshot-test:
2226
runs-on: ubuntu-latest
@@ -42,20 +46,6 @@ jobs:
4246
with:
4347
gradle-version: wrapper
4448

45-
- name: Create debug keystore file
46-
run: |
47-
echo "$DEBUG_KEYSTORE" > debug.keystore.b64
48-
base64 -d -i debug.keystore.b64 > debug.keystore
49-
env:
50-
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
51-
52-
- name: Create API credentials
53-
run: |
54-
echo "$API_CREDENTIALS" > app/bytemask.properties.b64
55-
base64 -d -i app/bytemask.properties.b64 > app/bytemask.properties
56-
env:
57-
API_CREDENTIALS: ${{ secrets.API_CREDENTIALS }}
58-
5949
- name: record screenshot
6050
id: record-test
6151
run: |

.github/workflows/build.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1616
cancel-in-progress: true
1717

18+
env:
19+
API_KEY: ${{ secrets.API_KEY }}
20+
API_SECRET: ${{ secrets.API_SECRET }}
21+
1822
jobs:
1923
build:
2024
runs-on: ubuntu-latest
@@ -41,20 +45,6 @@ jobs:
4145
- name: Grant execute permission for gradlew
4246
run: chmod +x gradlew
4347

44-
- name: Create debug keystore file
45-
run: |
46-
echo "$DEBUG_KEYSTORE" > debug.keystore.b64
47-
base64 -d -i debug.keystore.b64 > debug.keystore
48-
env:
49-
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
50-
51-
- name: Create API credentials
52-
run: |
53-
echo "$API_CREDENTIALS" > app/bytemask.properties.b64
54-
base64 -d -i app/bytemask.properties.b64 > app/bytemask.properties
55-
env:
56-
API_CREDENTIALS: ${{ secrets.API_CREDENTIALS }}
57-
5848
- name: Build debug
5949
run: ./gradlew assembleDebug --stacktrace
6050

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- 'v*'
77

8+
env:
9+
API_KEY: ${{ secrets.API_KEY }}
10+
API_SECRET: ${{ secrets.API_SECRET }}
11+
812
jobs:
913
release:
1014
runs-on: ubuntu-latest
@@ -32,13 +36,6 @@ jobs:
3236
- name: Grant execute permission for gradlew
3337
run: chmod +x gradlew
3438

35-
- name: Create API credentials
36-
run: |
37-
echo "$API_CREDENTIALS" > app/bytemask.properties.b64
38-
base64 -d -i app/bytemask.properties.b64 > app/bytemask.properties
39-
env:
40-
API_CREDENTIALS: ${{ secrets.API_CREDENTIALS }}
41-
4239
- name: Build changelog
4340
id: build_changelog
4441
uses: mikepenz/release-changelog-builder-action@v4

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
.externalNativeBuild
1818
.cxx
1919
local.properties
20-
bytemask.properties
2120
keystore.properties
2221
debug.keystore
2322
debug.keystore.b64

app/build.gradle.kts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import dev.shreyaspatil.bytemask.plugin.config.KeySource
21
import java.io.FileInputStream
32
import java.time.Instant
43
import java.util.Properties
@@ -15,7 +14,6 @@ plugins {
1514
alias(libs.plugins.appversioning)
1615
alias(libs.plugins.play.publisher)
1716
alias(libs.plugins.roborazzi)
18-
alias(libs.plugins.bytemask)
1917
}
2018

2119
android {
@@ -26,9 +24,6 @@ android {
2624
}
2725

2826
signingConfigs {
29-
if (System.getenv("CI").toBoolean()) {
30-
named("debug") { storeFile = rootProject.file("debug.keystore") }
31-
}
3227
create("release") {
3328
if (rootProject.file("keystore.properties").exists()) {
3429
val keystoreProperties = Properties()
@@ -71,16 +66,6 @@ android {
7166
}
7267
}
7368

74-
bytemaskConfig {
75-
configure("release") {
76-
enableEncryption = true
77-
encryptionKeySource = KeySource.SigningConfig(name = "release")
78-
}
79-
configure("debug") {
80-
enableEncryption = true
81-
}
82-
}
83-
8469
appVersioning {
8570
overrideVersionName { gitTag, providerFactory, variantInfo ->
8671
val buildNumber = providerFactory
@@ -122,7 +107,6 @@ dependencies {
122107
implementation(projects.core.data)
123108
implementation(projects.core.sync)
124109
implementation(projects.core.opml)
125-
implementation(projects.core.credentialsProvider)
126110
implementation(projects.ui.resources)
127111
implementation(projects.ui.preview)
128112
implementation(projects.ui.designSystem)

app/src/main/kotlin/com/mr3y/podcaster/PodcasterApplication.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ package com.mr3y.podcaster
33
import android.app.Application
44
import androidx.hilt.work.HiltWorkerFactory
55
import androidx.work.Configuration
6-
import com.mr3y.podcaster.core.credentials_provider.CredentialsProvider
76
import com.mr3y.podcaster.core.opml.FileManager
87
import com.mr3y.podcaster.core.sync.initializeWorkManagerInstance
98
import dagger.hilt.android.HiltAndroidApp
10-
import dev.shreyaspatil.bytemask.android.AndroidBytemask
119
import javax.inject.Inject
1210

1311
@HiltAndroidApp
@@ -22,8 +20,6 @@ class PodcasterApplication : Application(), Configuration.Provider {
2220
override fun onCreate() {
2321
super.onCreate()
2422
initializeWorkManagerInstance(this)
25-
AndroidBytemask.init(this)
26-
CredentialsProvider.setAPICredentials(key = BytemaskConfig.API_KEY, secret = BytemaskConfig.API_SECRET)
2723
fileManager.registerActivityWatcher()
2824
}
2925

app/src/test/kotlin/com/mr3y/podcaster/PodcasterApplication.kt

Lines changed: 0 additions & 10 deletions
This file was deleted.

core/credentials-provider/build.gradle.kts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)