Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop kotlin-dsl plugin #295

Merged
merged 9 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
`kotlin-dsl`
TWiStErRob marked this conversation as resolved.
Show resolved Hide resolved
TWiStErRob marked this conversation as resolved.
Show resolved Hide resolved
TWiStErRob marked this conversation as resolved.
Show resolved Hide resolved
kotlin("jvm") version "1.8.22"
3flex marked this conversation as resolved.
Show resolved Hide resolved
id("com.gradle.plugin-publish") version "1.2.1"
id("com.diffplug.spotless") version "6.23.3"
id("com.github.johnrengelman.shadow") version "8.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ internal open class DefaultNexusRepositoryContainer @Inject constructor(
sonatype(Action {})

override fun sonatype(action: Action<in NexusRepository>): NexusRepository = create("sonatype") {
nexusUrl.set(URI.create("https://oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://oss.sonatype.org/content/repositories/snapshots/"))
action.execute(this)
it.nexusUrl.set(URI.create("https://oss.sonatype.org/service/local/"))
it.snapshotRepositoryUrl.set(URI.create("https://oss.sonatype.org/content/repositories/snapshots/"))
action.execute(it)
}

override fun configure(configureClosure: Closure<*>): NamedDomainObjectContainer<NexusRepository> =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import org.gradle.api.Action
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Nested
import org.gradle.kotlin.dsl.domainObjectContainer
import org.gradle.kotlin.dsl.newInstance
import java.time.Duration

abstract class NexusPublishExtension(objects: ObjectFactory) {
Expand All @@ -48,8 +46,8 @@ abstract class NexusPublishExtension(objects: ObjectFactory) {
}

val repositories: NexusRepositoryContainer = objects.newInstance(
DefaultNexusRepositoryContainer::class,
objects.domainObjectContainer(NexusRepository::class)
DefaultNexusRepositoryContainer::class.java,
objects.domainObjectContainer(NexusRepository::class.java)
)

fun repositories(action: Action<in NexusRepositoryContainer>) {
Expand Down
Loading
Loading