Skip to content

Commit

Permalink
Merge pull request #7 from Carrieukie/feature/jitpack
Browse files Browse the repository at this point in the history
APP: Added jitpack configurations
  • Loading branch information
Carrieukie committed Oct 29, 2022
2 parents 8718b49 + 3d8e6a9 commit 2d43497
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 47 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

android {
namespace = ("com.karis.daraja")
namespace = ("com.github.daraja")
compileSdk = 33

defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

internal object Constants {
const val BUSINESS_SHORT_CODE = "174379"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

import android.os.Bundle
import androidx.activity.ComponentActivity
Expand All @@ -33,12 +33,12 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import androidx.lifecycle.lifecycleScope
import com.karis.daraja.driver.DarajaDriver
import com.karis.daraja.model.requests.STKPushRequest
import com.karis.daraja.ui.theme.DarajaTheme
import com.karis.daraja.utils.getPassword
import com.karis.daraja.utils.sanitizePhoneNumber
import com.karis.daraja.utils.timestamp
import com.github.daraja.driver.DarajaDriver
import com.github.daraja.model.requests.STKPushRequest
import com.github.daraja.ui.theme.DarajaTheme
import com.github.daraja.utils.getPassword
import com.github.daraja.utils.sanitizePhoneNumber
import com.github.daraja.utils.timestamp
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.ui.theme
package com.github.daraja.ui.theme

import androidx.compose.ui.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.ui.theme
package com.github.daraja.ui.theme

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Shapes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.ui.theme
package com.github.daraja.ui.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material.MaterialTheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.ui.theme
package com.github.daraja.ui.theme

import androidx.compose.material.Typography
import androidx.compose.ui.text.TextStyle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

import org.junit.Assert.assertEquals
import org.junit.Test
Expand Down
21 changes: 18 additions & 3 deletions daraja/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("maven-publish")
}

android {
namespace = ("com.karis.daraja")
compileSdk = 32
namespace = ("com.github.daraja")
compileSdk = 33

defaultConfig {
minSdk = 16
targetSdk = 32
targetSdk = 33

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -57,3 +58,17 @@ dependencies {
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}

afterEvaluate {
publishing {
publications {

create<MavenPublication>("daraja") {
from(project.components["release"])
groupId = "com.github.carrieukie"
artifactId = "image-preview-compose"
version = "1.0.0"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.di
package com.github.daraja.di

import com.karis.daraja.BuildConfig
import com.karis.daraja.services.STKPushService
import com.karis.daraja.utils.Constants
import com.github.daraja.BuildConfig
import com.github.daraja.services.STKPushService
import com.github.daraja.utils.Constants
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.driver
package com.github.daraja.driver

import android.util.Base64
import com.karis.daraja.di.DependenciesModule.provideLoggingInterceptor
import com.karis.daraja.di.DependenciesModule.provideMpesaService
import com.karis.daraja.di.DependenciesModule.provideOkHttpClient
import com.karis.daraja.di.DependenciesModule.provideRetrofit
import com.karis.daraja.model.requests.STKPushRequest
import com.karis.daraja.services.STKPushService
import com.karis.daraja.utils.DarajaStates
import com.karis.daraja.utils.Resource
import com.github.daraja.di.DependenciesModule.provideLoggingInterceptor
import com.github.daraja.di.DependenciesModule.provideMpesaService
import com.github.daraja.di.DependenciesModule.provideOkHttpClient
import com.github.daraja.di.DependenciesModule.provideRetrofit
import com.github.daraja.model.requests.STKPushRequest
import com.github.daraja.services.STKPushService
import com.github.daraja.utils.DarajaStates
import com.github.daraja.utils.Resource
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.driver
package com.github.daraja.driver

import com.karis.daraja.model.requests.STKPushRequest
import com.karis.daraja.utils.DarajaStates
import com.karis.daraja.utils.Resource
import com.github.daraja.model.requests.STKPushRequest
import com.github.daraja.utils.DarajaStates
import com.github.daraja.utils.Resource
import kotlinx.coroutines.flow.Flow

interface IDarajaDriver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.model.requests
package com.github.daraja.model.requests

import com.google.gson.annotations.SerializedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.model.response
package com.github.daraja.model.response

import com.google.gson.annotations.SerializedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.model.response
package com.github.daraja.model.response

import com.google.gson.annotations.SerializedName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.services
package com.github.daraja.services

import com.karis.daraja.model.requests.STKPushRequest
import com.karis.daraja.model.response.AccessTokenResponse
import com.karis.daraja.model.response.STKPushResponse
import com.github.daraja.model.requests.STKPushRequest
import com.github.daraja.model.response.AccessTokenResponse
import com.github.daraja.model.response.STKPushResponse
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.utils
package com.github.daraja.utils

internal object Constants {
const val CONNECT_TIMEOUT = 60 * 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.utils
package com.github.daraja.utils

sealed class DarajaStates<R>(
data: R?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja.utils
package com.github.daraja.utils

import android.util.Base64
import java.text.SimpleDateFormat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.karis.daraja
package com.github.daraja

import junit.framework.Assert.assertEquals
import org.junit.Test
Expand Down
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdk:
- openjdk11
before_install:
- ./scripts/prepareJitpackEnvironment.sh

0 comments on commit 2d43497

Please sign in to comment.