Skip to content

Commit 83023e4

Browse files
committed
Rename package from framework to core.
1 parent e3f3d4d commit 83023e4

37 files changed

+98
-94
lines changed

app/src/main/kotlin/com/fernandocejas/sample/BaseActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import android.support.v7.app.AppCompatActivity
2121
import android.view.View
2222
import android.view.Window
2323
import android.widget.Toast
24-
import com.fernandocejas.sample.framework.extension.inTransaction
24+
import com.fernandocejas.sample.core.extension.inTransaction
2525
import kotlinx.android.synthetic.main.activity_layout.fragmentContainer
2626
import kotlinx.android.synthetic.main.toolbar.progress
2727
import kotlinx.android.synthetic.main.toolbar.toolbar

app/src/main/kotlin/com/fernandocejas/sample/BaseFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import android.view.LayoutInflater
2525
import android.view.View
2626
import android.view.ViewGroup
2727
import com.fernandocejas.sample.di.ApplicationComponent
28-
import com.fernandocejas.sample.framework.extension.appContext
29-
import com.fernandocejas.sample.framework.extension.viewContainer
28+
import com.fernandocejas.sample.core.extension.appContext
29+
import com.fernandocejas.sample.core.extension.viewContainer
3030
import kotlinx.android.synthetic.main.toolbar.progress
3131
import javax.inject.Inject
3232

app/src/main/kotlin/com/fernandocejas/sample/framework/exception/Failure.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/exception/Failure.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.exception
16+
package com.fernandocejas.sample.core.exception
1717

1818
/**
1919
* Base Class for handling errors/failures/exceptions.

app/src/main/kotlin/com/fernandocejas/sample/framework/extension/Context.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/extension/Context.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.extension
16+
package com.fernandocejas.sample.core.extension
1717

1818
import android.content.Context
1919
import android.net.ConnectivityManager

app/src/main/kotlin/com/fernandocejas/sample/framework/extension/Fragment.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/extension/Fragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.extension
16+
package com.fernandocejas.sample.core.extension
1717

1818
import android.arch.lifecycle.ViewModel
1919
import android.arch.lifecycle.ViewModelProvider.Factory

app/src/main/kotlin/com/fernandocejas/sample/framework/extension/Lifecycle.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/extension/Lifecycle.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.extension
16+
package com.fernandocejas.sample.core.extension
1717

1818
import android.arch.lifecycle.LifecycleOwner
1919
import android.arch.lifecycle.LiveData
2020
import android.arch.lifecycle.Observer
21-
import com.fernandocejas.sample.framework.exception.Failure
21+
import com.fernandocejas.sample.core.exception.Failure
2222

2323
fun <T : Any, L : LiveData<T>> LifecycleOwner.observe(liveData: L, body: (T?) -> Unit) =
2424
liveData.observe(this, Observer(body))

app/src/main/kotlin/com/fernandocejas/sample/framework/extension/String.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/extension/String.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.extension
16+
package com.fernandocejas.sample.core.extension
1717

1818
fun String.Companion.empty() = ""

app/src/main/kotlin/com/fernandocejas/sample/framework/extension/View.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/extension/View.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.extension
16+
package com.fernandocejas.sample.core.extension
1717

1818
import android.graphics.drawable.Drawable
1919
import android.support.annotation.LayoutRes
@@ -49,7 +49,8 @@ fun ImageView.loadFromUrl(url: String) =
4949
.into(this)!!
5050

5151
fun ImageView.loadUrlAndPostponeEnterTransition(url: String, activity: FragmentActivity) {
52-
val target: Target<Drawable> = ImageViewBaseTarget(this, activity)
52+
val target: Target<Drawable> = ImageViewBaseTarget(this,
53+
activity)
5354
Glide.with(context.applicationContext).load(url).into(target)
5455
}
5556

app/src/main/kotlin/com/fernandocejas/sample/framework/functional/Either.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/functional/Either.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.functional
16+
package com.fernandocejas.sample.core.functional
1717

1818
/**
19-
* Represents a value of one of two possible types (a disjoint union.).
19+
* Represents a value of one of two possible types (a disjoint union).
2020
* Instances of [Either] are either an instance of [Left] or [Right].
21-
* FP Convention dictates that [Left] is used for "failure" and [Right] is used for "success".
21+
* FP Convention dictates that [Left] is used for "failure"
22+
* and [Right] is used for "success".
2223
*
2324
* @see Left
2425
* @see Right
@@ -35,7 +36,7 @@ sealed class Either<out L, out R> {
3536

3637
fun either(fnL: (L) -> Any, fnR: (R) -> Any): Any =
3738
when (this) {
38-
is Either.Left -> fnL(a)
39-
is Either.Right -> fnR(b)
39+
is Left -> fnL(a)
40+
is Right -> fnR(b)
4041
}
4142
}

app/src/main/kotlin/com/fernandocejas/sample/framework/interactor/UseCase.kt renamed to app/src/main/kotlin/com/fernandocejas/sample/core/interactor/UseCase.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.fernandocejas.sample.framework.interactor
16+
package com.fernandocejas.sample.core.interactor
1717

18-
import com.fernandocejas.sample.framework.exception.Failure
19-
import com.fernandocejas.sample.framework.functional.Either
18+
import com.fernandocejas.sample.core.exception.Failure
19+
import com.fernandocejas.sample.core.functional.Either
2020
import kotlinx.coroutines.experimental.CommonPool
2121
import kotlinx.coroutines.experimental.android.UI
2222
import kotlinx.coroutines.experimental.async

0 commit comments

Comments
 (0)