Skip to content

Commit

Permalink
github token fra env, repositories i settings.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
dagframstad committed Sep 21, 2023
1 parent b69f5be commit df6c998
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 78 deletions.
8 changes: 0 additions & 8 deletions async-recievers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ plugins {

apply(plugin = "io.spring.dependency-management")

repositories {
mavenCentral()
}

tasks.register<Wrapper>("wrapper") {
gradleVersion="8.1.1"
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.kafka:spring-kafka")
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
kotlin("jvm") version "1.9.0" apply false
kotlin("plugin.serialization") version "1.9.0" apply false
id("io.ktor.plugin") version "2.3.4" apply false
}
23 changes: 3 additions & 20 deletions cpa-repo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*
* This file was generated by the Gradle 'init' task.
*/
val githubPassword: String by project

plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm")
application
id("io.ktor.plugin") version "2.3.4"
kotlin("plugin.serialization") version "1.9.0"
id("io.ktor.plugin")
kotlin("plugin.serialization")
}

tasks {
Expand All @@ -18,22 +17,6 @@ tasks {

}

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll")
credentials {
username = "x-access-token"
password = githubPassword
}
}
}

tasks.register<Wrapper>("wrapper") {
gradleVersion="8.1.1"
}

dependencies {
implementation(project(":felles"))
implementation("io.ktor:ktor-server-core:2.3.4")
Expand Down
17 changes: 2 additions & 15 deletions ebms-provider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*/
val githubPassword: String by project

plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm")
application
id("io.ktor.plugin") version "2.3.4"
id("io.ktor.plugin")
}

tasks {
Expand All @@ -15,18 +14,6 @@ tasks {
}
}

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll")
credentials {
username = "x-access-token"
password = githubPassword
}
}
}

tasks.register<Wrapper>("wrapper") {
gradleVersion="8.1.1"
}
Expand Down
18 changes: 3 additions & 15 deletions felles/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
/*
* This file was generated by the Gradle 'init' task.
*/
val githubPassword: String by project

plugins {
kotlin("jvm") version "1.9.0"
kotlin("plugin.serialization") version "1.9.0"
}

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll")
credentials {
username = "x-access-token"
password = githubPassword
}
}
kotlin("jvm")
kotlin("plugin.serialization")
}

tasks.register<Wrapper>("wrapper") {
Expand All @@ -37,3 +24,4 @@ dependencies {

runtimeOnly("org.postgresql:postgresql:42.6.0")
}

24 changes: 4 additions & 20 deletions payload-processor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
/*
* This file was generated by the Gradle 'init' task.
*/
val githubPassword: String by project

plugins {
kotlin("jvm") version "1.9.0"
kotlin("plugin.serialization") version "1.9.0"
kotlin("jvm")
kotlin("plugin.serialization")
application
id("io.ktor.plugin") version "2.3.4"
id("io.ktor.plugin")
}

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll")
credentials {
username = "x-access-token"
password = githubPassword
}
}
}



tasks {

register<Wrapper>("wrapper") {
gradleVersion="8.1.1"
}
Expand Down Expand Up @@ -66,4 +50,4 @@ kotlin {
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
15 changes: 15 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,20 @@
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/8.1.1/userguide/multi_project_builds.html
*/

dependencyResolutionManagement {
repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll")
credentials {
username = "token"
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

rootProject.name = "ebxml-processor"
include("felles","async-recievers","cpa-repo","ebms-provider", "payload-processor")

0 comments on commit df6c998

Please sign in to comment.