From 5c073c0046bdc2a36d0f2e4303bca7792329b194 Mon Sep 17 00:00:00 2001 From: Eduardo Pool Date: Sun, 1 Jul 2018 16:31:48 -0500 Subject: [PATCH] FIX: Move classes to a package. --- src/main/kotlin/{ => com/nearsoft/ipapiklient}/IpApi.kt | 4 +++- .../kotlin/{ => com/nearsoft/ipapiklient}/IpApiKlient.kt | 8 +++++--- .../nearsoft/ipapiklient}/gson/IpCheckResultAdapter.kt | 8 ++++---- .../nearsoft/ipapiklient}/models/IpCheckResult.kt | 2 +- .../{ => com/nearsoft/ipapiklient}/models/IpError.kt | 2 +- .../{ => com/nearsoft/ipapiklient}/models/IpInfo.kt | 2 +- .../{ => com/nearsoft/ipapiklient}/IpApiKlientTest.kt | 6 ++++-- 7 files changed, 19 insertions(+), 13 deletions(-) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/IpApi.kt (93%) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/IpApiKlient.kt (91%) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/gson/IpCheckResultAdapter.kt (80%) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/models/IpCheckResult.kt (73%) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/models/IpError.kt (91%) rename src/main/kotlin/{ => com/nearsoft/ipapiklient}/models/IpInfo.kt (97%) rename src/test/kotlin/{ => com/nearsoft/ipapiklient}/IpApiKlientTest.kt (95%) diff --git a/src/main/kotlin/IpApi.kt b/src/main/kotlin/com/nearsoft/ipapiklient/IpApi.kt similarity index 93% rename from src/main/kotlin/IpApi.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/IpApi.kt index 93a1a6d..d41cc38 100644 --- a/src/main/kotlin/IpApi.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/IpApi.kt @@ -1,5 +1,7 @@ +package com.nearsoft.ipapiklient + +import com.nearsoft.ipapiklient.models.IpCheckResult import io.reactivex.Single -import models.IpCheckResult import retrofit2.http.GET import retrofit2.http.Path import retrofit2.http.Query diff --git a/src/main/kotlin/IpApiKlient.kt b/src/main/kotlin/com/nearsoft/ipapiklient/IpApiKlient.kt similarity index 91% rename from src/main/kotlin/IpApiKlient.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/IpApiKlient.kt index c59fe8b..6d04546 100644 --- a/src/main/kotlin/IpApiKlient.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/IpApiKlient.kt @@ -1,8 +1,10 @@ +package com.nearsoft.ipapiklient + import com.google.gson.GsonBuilder -import gson.IpCheckResultAdapter +import com.nearsoft.ipapiklient.gson.IpCheckResultAdapter +import com.nearsoft.ipapiklient.models.IpCheckResult +import com.nearsoft.ipapiklient.models.IpInfo import io.reactivex.Single -import models.IpCheckResult -import models.IpInfo import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Retrofit diff --git a/src/main/kotlin/gson/IpCheckResultAdapter.kt b/src/main/kotlin/com/nearsoft/ipapiklient/gson/IpCheckResultAdapter.kt similarity index 80% rename from src/main/kotlin/gson/IpCheckResultAdapter.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/gson/IpCheckResultAdapter.kt index a4e9939..8d5f389 100644 --- a/src/main/kotlin/gson/IpCheckResultAdapter.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/gson/IpCheckResultAdapter.kt @@ -1,12 +1,12 @@ -package gson +package com.nearsoft.ipapiklient.gson import com.google.gson.Gson import com.google.gson.JsonDeserializationContext import com.google.gson.JsonDeserializer import com.google.gson.JsonElement -import models.IpCheckResult -import models.IpError -import models.IpInfo +import com.nearsoft.ipapiklient.models.IpCheckResult +import com.nearsoft.ipapiklient.models.IpError +import com.nearsoft.ipapiklient.models.IpInfo import java.lang.reflect.Type object IpCheckResultAdapter : JsonDeserializer { diff --git a/src/main/kotlin/models/IpCheckResult.kt b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpCheckResult.kt similarity index 73% rename from src/main/kotlin/models/IpCheckResult.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/models/IpCheckResult.kt index 58deb25..8ac0b22 100644 --- a/src/main/kotlin/models/IpCheckResult.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpCheckResult.kt @@ -1,4 +1,4 @@ -package models +package com.nearsoft.ipapiklient.models data class IpCheckResult(val ipInfo: IpInfo?, val ipError: IpError?) { diff --git a/src/main/kotlin/models/IpError.kt b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpError.kt similarity index 91% rename from src/main/kotlin/models/IpError.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/models/IpError.kt index 12565c5..6118fdc 100644 --- a/src/main/kotlin/models/IpError.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpError.kt @@ -1,4 +1,4 @@ -package models +package com.nearsoft.ipapiklient.models /** * In case we don't have data on a specific field, the returned value will be, depending on the field type: diff --git a/src/main/kotlin/models/IpInfo.kt b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpInfo.kt similarity index 97% rename from src/main/kotlin/models/IpInfo.kt rename to src/main/kotlin/com/nearsoft/ipapiklient/models/IpInfo.kt index 4391e7b..a3279cf 100644 --- a/src/main/kotlin/models/IpInfo.kt +++ b/src/main/kotlin/com/nearsoft/ipapiklient/models/IpInfo.kt @@ -1,4 +1,4 @@ -package models +package com.nearsoft.ipapiklient.models /** * In case we don't have data on a specific field, the returned value will be, depending on the field type: diff --git a/src/test/kotlin/IpApiKlientTest.kt b/src/test/kotlin/com/nearsoft/ipapiklient/IpApiKlientTest.kt similarity index 95% rename from src/test/kotlin/IpApiKlientTest.kt rename to src/test/kotlin/com/nearsoft/ipapiklient/IpApiKlientTest.kt index f011781..05d8d13 100644 --- a/src/test/kotlin/IpApiKlientTest.kt +++ b/src/test/kotlin/com/nearsoft/ipapiklient/IpApiKlientTest.kt @@ -1,5 +1,7 @@ -import models.IpError -import models.IpInfo +package com.nearsoft.ipapiklient + +import com.nearsoft.ipapiklient.models.IpError +import com.nearsoft.ipapiklient.models.IpInfo import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it