diff --git a/backend/common-service/build.gradle.kts b/backend/common-service/build.gradle.kts index 7fc8f91e..28cccc11 100644 --- a/backend/common-service/build.gradle.kts +++ b/backend/common-service/build.gradle.kts @@ -1,10 +1,5 @@ -import com.gchristov.thecodinglove.gradleplugins.getLocalSecret - -val packageId = "com.gchristov.thecodinglove.commonservice" - plugins { id("kmp-module-plugin") - id("build-config-plugin") } kotlin { @@ -15,15 +10,4 @@ kotlin { } } } -} - -buildkonfig { - packageName = packageId - defaultConfigs { - buildConfigField( - type = com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING, - name = "APP_PUBLIC_URL", - value = getLocalSecret(rootProject, "APP_PUBLIC_URL") - ) - } } \ No newline at end of file diff --git a/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/CommonServiceModule.kt b/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/CommonServiceModule.kt index 55822c0a..6c41dd18 100644 --- a/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/CommonServiceModule.kt +++ b/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/CommonServiceModule.kt @@ -45,6 +45,5 @@ object CommonServiceModule : DiModule() { ): PubSubSubscription = GoogleCloudPubSubSubscription( log = log, pubSub = pubSub, - pubSubDomain = BuildKonfig.APP_PUBLIC_URL, ) } \ No newline at end of file diff --git a/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/pubsub/GoogleCloudPubSubSubscription.kt b/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/pubsub/GoogleCloudPubSubSubscription.kt index 822b2a92..6be056d6 100644 --- a/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/pubsub/GoogleCloudPubSubSubscription.kt +++ b/backend/common-service/src/jsMain/kotlin/com/gchristov/thecodinglove/commonservice/pubsub/GoogleCloudPubSubSubscription.kt @@ -10,7 +10,6 @@ import kotlin.js.json internal class GoogleCloudPubSubSubscription( private val log: Logger, private val pubSub: GoogleCloudPubSubExternals.PubSub, - private val pubSubDomain: String, ) : PubSubSubscription { init { process.env.GOOGLE_APPLICATION_CREDENTIALS = "local-credentials-pubsub.json" @@ -31,7 +30,7 @@ internal class GoogleCloudPubSubSubscription( log.d("Creating PubSub subscription $subscription") pubSubSubscription.create( // TODO: Fix this to use a env variable for the website - json("pushEndpoint" to "$pubSubDomain/$httpPath") + json("pushEndpoint" to "https://cloudrun-test-oe6rkpnjrq-uw.a.run.app/$httpPath") ).await() } Either.Right(Unit)