11apply plugin : ' java'
22apply plugin : ' eclipse'
33apply plugin : ' idea'
4+ apply plugin : ' maven-publish'
5+ apply plugin : ' com.jfrog.bintray'
46
57dependencies {
68 testCompile ' junit:junit:4.12'
@@ -15,8 +17,17 @@ tasks.withType(JavaCompile) {
1517 options. encoding = ' UTF-8'
1618}
1719
20+ buildscript {
21+ repositories {
22+ jcenter()
23+ }
24+ dependencies {
25+ classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
26+ }
27+ }
28+
1829repositories {
19- mavenCentral ()
30+ jcenter ()
2031}
2132
2233jar {
2536 }
2637}
2738
39+ // Publication to JFrog Bintray Maven repository
40+ task sourceJar (type : Jar ) {
41+ classifier ' sources'
42+ from sourceSets. main. allJava
43+ }
44+
45+ publishing {
46+ publications {
47+ publicationJdCore(MavenPublication ) {
48+ groupId ' org.jd'
49+ artifactId ' jd-core'
50+ version project. version
51+ from components. java
52+ artifact tasks. sourceJar
53+ }
54+ }
55+ }
56+
57+ bintray {
58+ user = System . getProperty(' bintray.user' )
59+ key = System . getProperty(' bintray.key' )
60+ publications = [' publicationJdCore' ]
61+
62+ dryRun = false // [Default: false] Whether to run this as dry-run, without deploying
63+ publish = true // [Default: false] Whether version should be auto published after an upload
64+ override = false // [Default: false] Whether to override version artifacts already published
65+
66+ pkg {
67+ userOrg = ' java-decompiler'
68+ repo = ' maven'
69+ name = ' org.jd:jd-core'
70+ description = ' JD-Core is a JAVA decompiler written in JAVA.'
71+ licenses = [' GPL-3.0' ]
72+
73+ websiteUrl = ' https://github.com/java-decompiler/jd-core'
74+ issueTrackerUrl = ' https://github.com/java-decompiler/jd-core/issues'
75+ vcsUrl = ' https://github.com/java-decompiler/jd-core.git'
76+
77+ publicDownloadNumbers = true
78+ version {
79+ name = project. version
80+ released = new Date ()
81+ }
82+ }
83+ }
84+
2885// 'cleanIdea' task extension //
2986cleanIdea. doFirst {
3087 delete project. name + ' .iws'
0 commit comments