File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and 
1414 * limitations under the License. 
1515 */  
16+ import  java.nio.charset.StandardCharsets 
17+ import  java.util.* 
1618import  kotlin.io.path.absolutePathString 
1719import  org.apache.tools.ant.filters.ReplaceTokens 
1820import  org.gradle.internal.extensions.stdlib.capitalized 
@@ -438,4 +440,16 @@ publishing {
438440  }
439441}
440442
441- signing { sign(publishing.publications[" pklLsp"  ]) }
443+ signing {
444+   //  provided as env vars `ORG_GRADLE_PROJECT_signingKey` and `ORG_GRADLE_PROJECT_signingPassword`
445+   //  in CI.
446+   val  signingKey = 
447+     (findProperty(" signingKey"  ) as  String? )?.let  {
448+       Base64 .getDecoder().decode(it).toString(StandardCharsets .US_ASCII )
449+     }
450+   val  signingPassword =  findProperty(" signingPassword"  ) as  String? 
451+   if  (signingKey !=  null  &&  signingPassword !=  null ) {
452+     useInMemoryPgpKeys(signingKey, signingPassword)
453+   }
454+   sign(publishing.publications[" pklLsp"  ])
455+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments