- JCenter 対応にするためには、sources.jar, javadoc.jar を生成する必要がある
gradle uploadArchives
でbuild/repository
以下に Maven レポジトリが展開される。Bintray の Files に直接突っ込めば OK. Version 以下のファイルだけ突っ込んでも、自動的に groupId ディレクトリを切るか聞いてくれます。
Created
April 30, 2015 17:25
-
-
Save kaiinui/8c33f94f22956f5455b5 to your computer and use it in GitHub Desktop.
Maven 対応プロジェクトにするためにとりあえず書いとくべき gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'maven' | |
task sourcesJar(type: Jar, dependsOn:classes) { | |
classifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
task javadocJar(type: Jar, dependsOn:javadoc) { | |
classifier = 'javadoc' | |
from javadoc.destinationDir | |
} | |
artifacts { | |
archives sourcesJar | |
archives javadocJar | |
} | |
uploadArchives { | |
repositories { | |
mavenDeployer { | |
repository url: "file://${buildDir}/repository" | |
pom.version = '0.1.0' | |
pom.groupId = 'com.example.XXXXXX' | |
pom.artifactId = 'XXXXXX' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment