fix(release): 리허설·릴리스 태스크가 프로젝트 좌표를 읽게 한다
releaseRehearsal과 release가 태스크 설정 블록 안에서 `path`·`group`· `version`을 읽었다. 그 자리에서 셋은 프로젝트가 아니라 태스크의 속성이라 루트 publish 태스크 경로를 `:releaseRehearsal:publish…`로 만들고, 좌표를 `release:<모듈>:0.0.0`으로 찾았다. 좌표를 루트에서 한 번 잡아 쓴다. 같이 고친 것: - grpc-core-api의 test fixtures 변형을 publication에서 뺀다. 이 repo 시험끼리 쓰는 지원 코드이고(배포하는 testkit은 grpc-testkit), Maven이 표현하지 못하는 capability라 POM 경고를 냈다. - Trivy 호출에 --skip-version-check. 새 버전 알림이 매번 네트워크를 부르고 로그를 덮었다. 검증(desktop): releaseRehearsal rc=0. 9개 모듈 + SBOM(733 components)이 staging에 올라가고 파일·체크섬 넷·POM/module 의존성 버전 확인 통과. 의존성 검사는 HIGH·CRITICAL 0, KEV 일치 0. 버리는 시험 키로 서명한 리허설도 rc=0, gpg --verify Good signature(키는 임시 폴더째 지웠다).
This commit is contained in:
+18
@@ -1,9 +1,11 @@
|
||||
package dev.caskeleton.buildlogic.publishing;
|
||||
|
||||
import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension;
|
||||
import java.util.List;
|
||||
import org.gradle.api.GradleException;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.component.AdhocComponentWithVariants;
|
||||
import org.gradle.api.credentials.HttpHeaderCredentials;
|
||||
import org.gradle.api.plugins.JavaPluginExtension;
|
||||
import org.gradle.api.provider.Provider;
|
||||
@@ -58,6 +60,22 @@ public final class LibraryPublishingPlugin implements Plugin<Project> {
|
||||
.getByType(DependencyManagementExtension.class)
|
||||
.generatedPomCustomization(customization -> customization.setEnabled(false));
|
||||
|
||||
// Test fixtures are this repository's own test support (grpc-core-api's, shared by the other
|
||||
// modules' tests); the published testkit is grpc-testkit. They stay out of the publication, which
|
||||
// also keeps a capability Maven cannot express out of the POM.
|
||||
project
|
||||
.getPlugins()
|
||||
.withId(
|
||||
"java-test-fixtures",
|
||||
ignored -> {
|
||||
AdhocComponentWithVariants component =
|
||||
(AdhocComponentWithVariants) project.getComponents().getByName("java");
|
||||
for (String variant : List.of("testFixturesApiElements", "testFixturesRuntimeElements")) {
|
||||
component.withVariantsFromConfiguration(
|
||||
project.getConfigurations().getByName(variant), details -> details.skip());
|
||||
}
|
||||
});
|
||||
|
||||
Provider<String> packagesUrl = project.getProviders().gradleProperty("packagesUrl");
|
||||
Provider<String> repositoryUrl = project.getProviders().gradleProperty("repositoryUrl");
|
||||
Provider<String> token = project.getProviders().environmentVariable("PACKAGES_TOKEN");
|
||||
|
||||
Reference in New Issue
Block a user