File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ val nativeLibDir = layout.buildDirectory.dir("generated/libs/native/")
5353val  treeSitterPklRepoDir =  layout.buildDirectory.dir(" repos/tree-sitter-pkl"  )
5454val  treeSitterRepoDir =  layout.buildDirectory.dir(" repos/tree-sitter"  )
5555
56+ val  dummy:  SourceSet  by sourceSets.creating
57+ 
5658dependencies {
5759  implementation(kotlin(" reflect"  ))
5860  implementation(libs.clikt)
@@ -137,6 +139,22 @@ tasks.shadowJar {
137139  from(pklStdlibFiles) { rename(" (.*).zip"  , " $1.jar"  ) }
138140}
139141
142+ val  javadocDummy by tasks.creating(Javadoc ::class ) { source =  dummy.allJava }
143+ 
144+ //  create a dummy javadoc jar to make maven central happy
145+ val  javadocJar by
146+   tasks.registering(Jar ::class ) {
147+     dependsOn(javadocDummy)
148+     archiveClassifier =  " javadoc" 
149+     from(javadocDummy.destinationDir)
150+   }
151+ 
152+ val  sourcesJar by
153+   tasks.registering(Jar ::class ) {
154+     from(sourceSets.main.get().allSource)
155+     archiveClassifier =  " sources" 
156+   }
157+ 
140158fun  configureRepo (
141159  repo :  String ,
142160  simpleRepoName :  String ,
@@ -397,6 +415,8 @@ publishing {
397415        classifier =  null 
398416        extension =  " jar" 
399417      }
418+       artifact(javadocJar.flatMap { it.archiveFile }) { classifier =  " javadoc"   }
419+       artifact(sourcesJar.flatMap { it.archiveFile }) { classifier =  " sources"   }
400420      pom {
401421        name.set(" pkl-lsp"  )
402422        url.set(" https://github.com/apple/pkl-lsp"  )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments