Skip to content

Commit af4d283

Browse files
committed
Upgrade to Gradle 7.2
1 parent cec0049 commit af4d283

File tree

6 files changed

+35
-3
lines changed

6 files changed

+35
-3
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id("com.bakdata.sonar") version "1.1.17"
66
id("com.bakdata.sonatype") version "1.1.18"
77
id("org.hildan.github.changelog") version "1.13.1"
8-
id("org.gradle.kotlin.kotlin-dsl") version "1.4.9" apply false
8+
id("org.gradle.kotlin.kotlin-dsl") version "2.1.6" apply false
99
id("com.gradle.plugin-publish") version "1.2.1" apply false
1010
}
1111

gradle/wrapper/gradle-wrapper.jar

-333 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class SonatypePlugin : Plugin<Project> {
108108
username.set(getOverriddenSetting(SonatypeSettings::osshrUsername))
109109
password.set(getOverriddenSetting(SonatypeSettings::osshrPassword))
110110
getOverriddenSetting(SonatypeSettings::nexusUrl)?.let { nexusUrl.set(uri(it)) }
111+
allowInsecureProtocol.set(getOverriddenSetting(SonatypeSettings::allowInsecureProtocol))
111112
}
112113
}
113114
}
@@ -166,6 +167,10 @@ class SonatypePlugin : Plugin<Project> {
166167
getOverriddenSetting(SonatypeSettings::connectTimeout)?.let {
167168
nexus.connectTimeout.value(Duration.ofSeconds(it))
168169
}
170+
171+
getOverriddenSetting(SonatypeSettings::allowInsecureProtocol)?.let {
172+
nexus.repositories["nexus"].allowInsecureProtocol.value(it)
173+
}
169174
}
170175
}
171176
}

sonatype/src/main/kotlin/com/bakdata/gradle/SonatypeSettings.kt

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*
2+
* The MIT License
3+
*
4+
* Copyright (c) 2024 bakdata GmbH
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
125
package com.bakdata.gradle
226

327
import au.com.console.kassava.kotlinToString
@@ -29,10 +53,11 @@ open class SonatypeSettings(var project: Project) {
2953
var developers: Action<in MavenPomDeveloperSpec>? = null
3054
var connectTimeout: Long = 300
3155
var clientTimeout: Long = 300
56+
var allowInsecureProtocol: Boolean = false
3257

3358
fun developers(developerSpec: Action<in MavenPomDeveloperSpec>) {
3459
this.developers = developerSpec
3560
}
3661

3762
override fun toString() = kotlinToString(properties = SonatypeSettings::class.memberProperties.toTypedArray())
38-
}
63+
}

sonatype/src/test/kotlin/com/bakdata/gradle/SonatypePluginIT.kt

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ internal class SonatypePluginIT {
7979
}
8080
}
8181
nexusUrl = "${wiremock.baseUrl()}"
82+
allowInsecureProtocol = true
8283
}
8384
""".trimIndent())
8485

@@ -170,6 +171,7 @@ internal class SonatypePluginIT {
170171
}
171172
}
172173
nexusUrl = "${wiremock.baseUrl()}"
174+
allowInsecureProtocol = true
173175
}
174176
175177
subprojects {

0 commit comments

Comments
 (0)