/* Ċ Ġ* ĠCopyright Ġ 2 0 2 1 Ġthe Ġoriginal Ġauthor Ġor Ġauthors . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġio . github . grad len exus . publish plugin Ċ Ċ import Ġio . github . grad len exus . publish plugin . internal . Staging Repository Descriptor Registry Ċ import Ġio . github . grad len exus . publish plugin . internal . Staging Repository Transition er Ċ import Ġorg . gradle . api . model . ObjectFactory Ċ import Ġorg . gradle . api . provider . Provider Ċ import Ġorg . gradle . api . tasks . options . Option Ċ import Ġjavax . inject . Inject Ċ Ċ open Ġclass ĠRelease N exus Staging Repository Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġobjects : ĠObject Factory , ĊĠĠĠ Ġextension : ĠN exus Publish Extension , ĊĠĠĠ Ġrepository : ĠN exus Repository , ĊĠĠĠ Ġregistry : ĠProvider < Staging Repository Descriptor Registry > Ċ ) Ġ: ĠAbstract Transition N exus Staging Repository Task ( objects , Ġextension , Ġrepository , Ġregistry ) Ġ{ ĊĊĠĠĠ Ġ@ Option ( option Ġ= Ġ" staging - repository - id ", Ġdescription Ġ= Ġ" staging Ġrepository Ġid Ġto Ġrelease ") ĊĠĠĠ Ġfun Ġset Staging Repository Id ( staging Repository Id : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . staging Repository Id . set ( staging Repository Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġtransition Staging Repo ( repository Transition er : ĠSt aging Repository Transition er ) Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" Re leasing Ġstaging Ġrepository Ġwith Ġid Ġ'{} '", Ġstaging Repository Id . get ()) ĊĠĠĠĠĠĠĠ Ġrepository Transition er . effect ively Release ( staging Repository Id . get (), Ġrepository Description . get ()) ĊĠĠĠĠĠĠĠ Ġlogger . info (" Repository Ġwith Ġid Ġ'{}' Ġeffectively Ġreleased ", Ġstaging Repository Id . get ()) ĊĠĠĠ Ġ} Ċ } Ċ