2017-05-06 2 views
1

나는 gradle-bintray guide을 따르며 구성이 작동합니다. 문제가 발생하면 license-gradle-plugin도 활성화됩니다. 라이센스 - 플러그인 다음과 같은 설정 작업없이bintray-plugin과 license-gradle-plugin을 함께 사용하십시오.

합니다 (POM 파일이 제대로 생성됩니다) : 나는 또한 라이센스 플러그인을 활성화하면

// Create the pom configuration: 
def pomConfig = { 
    licenses { 
     license { 
      name "The Apache Software License, Version 2.0" 
      url "http://www.apache.org/licenses/LICENSE-2.0.txt" 
      distribution "repo" 
     } 
    } 

, 나는 다음과 같이 구성해야 :

apply plugin: "com.github.hierynomus.license" 
license { 
    header rootProject.file('LICENSE_HEADER') 
    ext.year = Calendar.getInstance().get(Calendar.YEAR) 
    ... 
} 

이제 bintray 플러그인이 잘못된 pom 파일을 만듭니다. license 노드가 없습니다. 제 생각에 문제는 라이센스 플러그인 구성이 이제 POM 구성 객체 정의에 사용된다는 것입니다.

// Create the pom configuration: 
def pomConfig = { 
    licenses { 
     license { # THIS DOES NOT WORK ANYMORE! 
      name "The Apache Software License, Version 2.0" 

어떻게 해결할 수 있습니까?

+0

도 참조 : https://github.com/bintray/gradle-bintray-plugin/issues/183 – TmTron

답변

0

hierynomus license-gradle-plugin #138에서 제안 된 작업 방식이 작동합니다.

당신이 bintray - 플러그인을 사용하여 구성 할 때 license([:])

def pomConfig = { 
    licenses { 
    license([:]) { // right here, using license as function call 
     name "The Apache Software License, Version 2.0" 
     url "http://www.apache.org/licenses/LICENSE-2.0.txt" 
     distribution "repo" 
    } 
    } 
} 
관련 문제