Skip to content

Commit

Permalink
Merge pull request #20 from mayorJAY/feat-maven-publish
Browse files Browse the repository at this point in the history
Fix KtLint issues and Configure Gradle BuildScan
  • Loading branch information
unicodeveloper authored Sep 19, 2023
2 parents 82c9d2f + bdd7474 commit 443ed86
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3

- name: Publish package
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ tasks.test {
kotlin {
jvmToolchain(8)
}
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
// extensions.findByName("buildScan")?.withGroovyBuilder {
// setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
// setProperty("termsOfServiceAgree", "yes")
// }
publishing {
repositories {
maven {
Expand Down
15 changes: 14 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@

rootProject.name = "novu-kotlin"

plugins {
id("com.gradle.enterprise") version("3.15")
}

gradleEnterprise {
if (System.getenv("CI") != null) {
buildScan {
publishAlways()
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/Novu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class Novu(
internal val notificationGroupsApi by lazy { retrofitInstance.create(NotificationGroupsApi::class.java) }

internal val inboundParseApi by lazy { retrofitInstance.create(InboundParseApi::class.java) }
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/api/NotificationGroupsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ interface NotificationGroupsApi {

@DELETE("notification-groups/{id}")
suspend fun deleteWorkflowGroup(@Path("id") id: String): Response<ResponseWrapper<DeleteWorkflowGroupResponse>>
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/api/TopicsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ interface TopicsApi {

@DELETE("topics/{topicKey}")
suspend fun deleteTopic(@Path("topicKey") topicKey: String): Response<Unit>
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/Topic.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto
data class Topic(
var type: String? = null,
var topicKey: String? = null
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/request/BulkTriggerEventRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package co.novu.dto.request

data class BulkTriggerEventRequest(
val events: List<TriggerEventRequest>
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/request/ChangesRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package co.novu.dto.request

data class ChangesRequest(
var changeIds: List<Any>? = null
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.request
data class MarkMessageActionAsSeenRequest(
var status: String?,
var payload: Any? = null
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/request/NotificationRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ data class NotificationRequest(
var search: String?,
var page: BigInteger? = null,
var transactionId: String? = null
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ data class CheckTopicSubscriberResponse(
var _topicId: String? = null,
var topicKey: String? = null,
var externalSubscriberId: String? = null
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/response/DeleteLayoutResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.response
data class DeleteLayoutResponse(
val acknowledged: Boolean = true,
val status: String = "Done"
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/response/DeleteTopicResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.response
data class DeleteTopicResponse(
val acknowledged: Boolean = true,
val status: String = "Done"
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.response
data class DeleteWorkflowGroupResponse(
var acknowledged: Boolean? = null,
var status: String? = null
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/response/RemoveSubscriberResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.response
data class RemoveSubscriberResponse(
val acknowledged: Boolean = true,
val status: String = "Done"
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/dto/response/SetDefaultLayoutResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package co.novu.dto.response
data class SetDefaultLayoutResponse(
val acknowledged: Boolean = true,
val status: String = "Done"
)
)
2 changes: 1 addition & 1 deletion src/main/kotlin/extentions/EventsExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ fun Novu.cancelTriggerEvent(transactionId: String) = runBlocking {
} else {
throw Exception(response.errorBody()?.string())
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/extentions/NotificationGroupsExtentions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ fun Novu.deleteWorkflowGroup(id: String) = runBlocking {
} else {
throw Exception(response.errorBody()?.string())
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/extentions/TopicsExtentions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ fun Novu.deleteTopic(topicKey: String) = runBlocking {
} else {
throw Exception(response.errorBody()?.string())
}
}
}
10 changes: 6 additions & 4 deletions src/test/kotlin/EventsApiTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ class EventsApiTest {
)
val requestBody = TriggerEventRequest(
name = "test",
to = listOf(Topic(
type = "Topic",
topicKey = "posts:comment:12345"
)),
to = listOf(
Topic(
type = "Topic",
topicKey = "posts:comment:12345"
)
),
payload = mapOf("customVariables" to "Hello"),
transactionId = "transactionId"
)
Expand Down

0 comments on commit 443ed86

Please sign in to comment.