@@ -11,9 +11,6 @@ val kotlinVersion = "1.3.61"
11
11
val mavenRepoBaseUrl = " https://oss.sonatype.org"
12
12
val mainClassKt = " no.nav.security.mock.StandaloneMockOAuth2ServerKt"
13
13
14
- group = " no.nav.security"
15
- version = " 0.1-SNAPSHOT"
16
-
17
14
plugins {
18
15
application
19
16
kotlin(" jvm" ) version " 1.3.61"
@@ -61,7 +58,7 @@ dependencies {
61
58
publishing {
62
59
publications {
63
60
create<MavenPublication >(" mavenJava" ) {
64
- artifactId = " mock-oauth2-server "
61
+ artifactId = " ${rootProject.name} "
65
62
from(components[" java" ])
66
63
versionMapping {
67
64
usage(" java-api" ) {
@@ -73,9 +70,9 @@ publishing {
73
70
}
74
71
}
75
72
pom {
76
- name.set(" mock-oauth2-server " )
73
+ name.set(" ${rootProject.name} " )
77
74
description.set(" A simple mock oauth2 server based on OkHttp MockWebServer" )
78
- url.set(" https://github.com/navikt/mock-oauth2-server " )
75
+ url.set(" https://github.com/navikt/${rootProject.name} " )
79
76
80
77
licenses {
81
78
license {
@@ -95,9 +92,9 @@ publishing {
95
92
}
96
93
}
97
94
scm {
98
- connection.set(" scm:git:git://github.com/navikt/mock-oauth2-server .git" )
99
- developerConnection.set(" scm:git:ssh://github.com/navikt/mock-oauth2-server .git" )
100
- url.set(" https://github.com/navikt/mock-oauth2-server " )
95
+ connection.set(" scm:git:git://github.com/navikt/${rootProject.name} .git" )
96
+ developerConnection.set(" scm:git:ssh://github.com/navikt/${rootProject.name} .git" )
97
+ url.set(" https://github.com/navikt/${rootProject.name} " )
101
98
}
102
99
withXml {
103
100
// dependencies.
@@ -114,10 +111,17 @@ publishing {
114
111
}
115
112
repositories {
116
113
maven {
114
+ name = " GitHubPackages"
115
+ url = uri(" https://maven.pkg.github.com/navikt/${rootProject.name} " )
116
+ credentials {
117
+ username = System .getenv(" GITHUB_ACTOR" )
118
+ password = System .getenv(" GITHUB_TOKEN" )
119
+ }
120
+ /*
117
121
// change URLs to point to your repos, e.g. http://my.org/repo
118
122
val releasesRepoUrl = uri("$mavenRepoBaseUrl/service/local/staging/deploy/maven2/")
119
123
val snapshotsRepoUrl = uri("$mavenRepoBaseUrl/content/repositories/snapshots")
120
- url = if (version.toString().endsWith(" SNAPSHOT" )) snapshotsRepoUrl else releasesRepoUrl
124
+ url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl*/
121
125
}
122
126
}
123
127
}
0 commit comments