Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : baseURL 숨김 처리 #195

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ jobs:
run:
echo API_KEY=\"$API_KEY\" > ./local.properties
- name: Build with Gradle
run: ./gradlew build
env:
BASE_URL: ${{ secrets.BASE_URL }}
run:
echo API_KEY=\"$API_KEY\" > ./local.properties
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ android {
versionName "1.0.3"

buildConfigField "String", "API_KEY", properties['API_KEY']
buildConfigField "String", "BASE_URL", properties['BASE_URL']
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ object RetrofitObject {
private const val TIME_OUT_COUNT: Long = 10

fun getNetwork(): Retrofit {
val baseUrl = "http://43.200.194.238:8080/"

val baseInterceptor = Interceptor { chain ->
val request = chain.request().newBuilder()
val originalHttpUrl = chain.request().url
Expand All @@ -33,7 +31,7 @@ object RetrofitObject {
}).build()

return Retrofit.Builder()
.baseUrl(baseUrl)
.baseUrl(BuildConfig.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.client(client)
.build()
Expand Down
Loading