Skip to content

Commit

Permalink
🔖 local.properties missing 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
bngsh committed Dec 8, 2022
1 parent 1cfc6a7 commit 4bbbdfc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {

Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
def naver_map_client_id = properties.getProperty("naver.map.client.id")

android {
namespace "com.whyranoid.presentation"
Expand All @@ -19,10 +18,10 @@ android {
minSdk 23
targetSdk 33

buildConfigField "String", "NAVER_MAP_CLIENT_ID", properties.getOrDefault("naver.map.client.id", "\"\"")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"

manifestPlaceholders = [naverMapClientId: naver_map_client_id]
}

buildTypes {
Expand Down
3 changes: 0 additions & 3 deletions presentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
android:exported="true">
</activity>
<activity android:name="com.whyranoid.presentation.running.RunningActivity" />
<meta-data
android:name="com.naver.maps.map.CLIENT_ID"
android:value="${naverMapClientId}" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.NavigationUI
import com.naver.maps.map.NaverMapSdk
import com.whyranoid.presentation.databinding.ActivityMainBinding
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -16,6 +17,9 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

NaverMapSdk.getInstance(applicationContext).client =
NaverMapSdk.NaverCloudPlatformClient(BuildConfig.NAVER_MAP_CLIENT_ID)

binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

Expand Down
2 changes: 1 addition & 1 deletion signin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdk 23
targetSdk 33

buildConfigField "String", "token", properties["token"]
buildConfigField "String", "token", properties.getOrDefault("token", "\"\"")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down

0 comments on commit 4bbbdfc

Please sign in to comment.