File tree 7 files changed +10
-12
lines changed
app/src/main/java/com/example/androidapp
7 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package com.example.androidapp.components.feed
3
3
import android.content.Context
4
4
import android.util.Log
5
5
import androidx.lifecycle.*
6
- import com.example.androidapp.FEED_TEMPLATE_ENDPOINT
6
+ import com.example.androidapp.config. FEED_TEMPLATE_ENDPOINT
7
7
import com.example.androidapp.data.feed.Feed
8
8
import com.example.androidapp.data.feed.FeedDatabase
9
9
import com.example.androidapp.data.feed.FeedRepo
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import androidx.lifecycle.LiveData
6
6
import androidx.lifecycle.MutableLiveData
7
7
import androidx.lifecycle.ViewModel
8
8
import androidx.lifecycle.viewModelScope
9
- import com.example.androidapp.HACKER_NEWS_TEMPLATE_ENDPOINT
9
+ import com.example.androidapp.config. HACKER_NEWS_TEMPLATE_ENDPOINT
10
10
import com.example.androidapp.data.hackernews.HackerNews
11
11
import com.example.androidapp.data.hackernews.HackerNewsDatabase
12
12
import com.example.androidapp.data.hackernews.HackerNewsRepo
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import androidx.lifecycle.viewModelScope
8
8
import com.android.volley.Request
9
9
import com.android.volley.toolbox.StringRequest
10
10
import com.android.volley.toolbox.Volley
11
- import com.example.androidapp.KITCHEN_SINK_TEMPLATE_ENDPOINT
11
+ import com.example.androidapp.config. KITCHEN_SINK_TEMPLATE_ENDPOINT
12
12
import com.example.androidapp.data.kitchensink.KitchenSink
13
13
import com.example.androidapp.data.kitchensink.KitchenSinkDatabase
14
14
import com.example.androidapp.data.kitchensink.KitchenSinkRepo
Original file line number Diff line number Diff line change 1
- package com.example.androidapp
2
-
3
- import com.example.androidapp.config.IP
1
+ package com.example.androidapp.config
4
2
5
3
const val FEED_TEMPLATE_ENDPOINT = " ws://" + IP + " :9090/feed"
6
4
const val HACKER_NEWS_TEMPLATE_ENDPOINT = " ws://" + IP + " :9090/hacker-news"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package com.example.androidapp.config
2
+
3
+ const val IP = " ipaddress"
Original file line number Diff line number Diff line change 5
5
LOCAL_IP=$1
6
6
fi
7
7
8
- cp scripts/graphql -template-file.kt app/src/main/java/com/example/androidapp/config/GraphQLEndpoint .kt
8
+ cp scripts/ip -template-file.kt app/src/main/java/com/example/androidapp/config/ip .kt
9
9
10
10
if [[ " $OSTYPE " == " linux-gnu" * ]]; then
11
11
# linux
12
12
if [ -z " $0 " ]
13
13
then
14
14
LOCAL_IP=$( ifconfig getifaddr en0)
15
15
fi
16
- sed -i ' s/ipaddress/' $LOCAL_IP ' /g' app/src/main/java/com/example/androidapp/config/GraphQLEndpoint .kt
16
+ sed -i ' s/ipaddress/' $LOCAL_IP ' /g' app/src/main/java/com/example/androidapp/config/ip .kt
17
17
elif [[ " $OSTYPE " == " darwin" * ]]; then
18
18
# Mac OSX
19
19
if [ -z " $0 " ]
20
20
then
21
21
LOCAL_IP=$( ipconfig getifaddr en0)
22
22
fi
23
- sed -i ' ' ' s/ipaddress/' $LOCAL_IP ' /g' app/src/main/java/com/example/androidapp/config/GraphQLEndpoint .kt
23
+ sed -i ' ' ' s/ipaddress/' $LOCAL_IP ' /g' app/src/main/java/com/example/androidapp/config/ip .kt
24
24
fi
You can’t perform that action at this time.
0 commit comments