Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "net.kyori"
version = "3.1.4-SNAPSHOT"
version = "3.2.0-SNAPSHOT"
description = "KyoriPowered organizational build standards and utilities"

subprojects {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of indra, licensed under the MIT License.
*
* Copyright (c) 2020-2022 KyoriPowered
* Copyright (c) 2020-2025 KyoriPowered
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -38,6 +38,15 @@ public SonatypeRepositoriesImpl(final RepositoryHandler repositories) {
this.repositories = repositories;
}

@Override
public MavenArtifactRepository snapshots() {
return this.repositories.maven(repo -> {
repo.setName("sonatypeSnapshots");
repo.setUrl("https://central.sonatype.com/repository/maven-snapshots/");
repo.mavenContent(MavenRepositoryContentDescriptor::snapshotsOnly);
});
}

@Override
public MavenArtifactRepository ossSnapshots() {
return this.repositories.maven(repo -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of indra, licensed under the MIT License.
*
* Copyright (c) 2020-2022 KyoriPowered
* Copyright (c) 2020-2025 KyoriPowered
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,14 +34,26 @@
public interface SonatypeRepositories {
String EXTENSION_NAME = "sonatype";

/**
* Add the Sonatype snapshot repository to this project.
*
* <p>The URL for this repository is {@literal https://central.sonatype.com/repository/maven-snapshots/}.</p>
*
* @return the created repository
* @since 3.2.0
*/
MavenArtifactRepository snapshots();

/**
* Add the Sonatype OSS snapshot repository to this project.
*
* <p>The URL for this repository is {@literal https://oss.sonatype.org/content/repositories/snapshots/}.</p>
*
* @return the created repository
* @since 2.1.0
* @deprecated replaced by {@link #snapshots()} due to the new Central publishing system
*/
@Deprecated
MavenArtifactRepository ossSnapshots();

/**
Expand All @@ -51,7 +63,9 @@ public interface SonatypeRepositories {
*
* @return the created repository
* @since 2.1.0
* @deprecated replaced by {@link #snapshots()} due to the new Central publishing system
*/
@Deprecated
default MavenArtifactRepository s01Snapshots() {
return this.snapshotsOn(1);
}
Expand All @@ -66,6 +80,8 @@ default MavenArtifactRepository s01Snapshots() {
* @param host the host number
* @return the created repository
* @since 2.1.0
* @deprecated replaced by {@link #snapshots()} due to the new Central publishing system
*/
@Deprecated
MavenArtifactRepository snapshotsOn(int host);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of indra, licensed under the MIT License.
*
* Copyright (c) 2020-2022 KyoriPowered
* Copyright (c) 2020-2025 KyoriPowered
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,6 +34,8 @@ public interface IndraSonatypePublishingExtension {
*
* @param name the prefix to use -- for example, to use {@code s01.oss.sonatype.org}, the name should be {@code s01}
* @since 2.0.0
* @deprecated No longer relevant with the new Central publishing system
*/
@Deprecated
void useAlternateSonatypeOSSHost(final String name);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of indra, licensed under the MIT License.
*
* Copyright (c) 2020-2022 KyoriPowered
* Copyright (c) 2020-2025 KyoriPowered
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,6 +25,7 @@

import io.github.gradlenexus.publishplugin.NexusPublishExtension;
import io.github.gradlenexus.publishplugin.NexusPublishPlugin;
import java.net.URI;
import java.time.Duration;
import net.kyori.indra.IndraPlugin;
import net.kyori.indra.IndraPublishingPlugin;
Expand Down Expand Up @@ -52,7 +53,10 @@ public void apply(final @NotNull Project project, final @NotNull PluginContainer
plugins.apply(NexusPublishPlugin.class);

extensions.configure(NexusPublishExtension.class, extension -> {
extension.getRepositories().sonatype();
extension.getRepositories().sonatype(repo -> {
repo.getNexusUrl().set(URI.create("https://ossrh-staging-api.central.sonatype.com/service/local/"));
repo.getSnapshotRepositoryUrl().set(URI.create("https://central.sonatype.com/repository/maven-snapshots/"));
});

// Bump out timeouts for days when OSSRH is slow
extension.getClientTimeout().set(Duration.ofMinutes(5));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of indra, licensed under the MIT License.
*
* Copyright (c) 2020-2022 KyoriPowered
* Copyright (c) 2020-2025 KyoriPowered
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -39,6 +39,7 @@ public IndraSonatypePublishingExtensionImpl(final NexusPublishExtension nexusExt
this.nexusExtension = nexusExtension;
}

@Deprecated
@Override
public void useAlternateSonatypeOSSHost(final String name) {
final NexusRepository repo = this.nexusExtension.getRepositories().maybeCreate(SONATYPE_REPO);
Expand Down