Skip to content

Commit 78fdfaf

Browse files
committed
Move to jcenter repository
1 parent b57c15e commit 78fdfaf

File tree

3 files changed

+59
-25
lines changed

3 files changed

+59
-25
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Linepush Gradle Plugin
22

3-
![build-status](https://travis-ci.org/newnewcoder/linepush-gradle-plugin.svg?branch=master)
3+
![travis-ci](https://travis-ci.org/newnewcoder/linepush-gradle-plugin.svg?branch=master)
4+
[![license](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
5+
[![download](https://api.bintray.com/packages/newnewcoder/generic/linepush-gradle-plugin/images/download.svg) ](https://bintray.com/newnewcoder/generic/linepush-gradle-plugin/_latestVersion)
46

57
## About
68
It's a gradle plugin using [line-bot message push api](https://devdocs.line.me/en/#push-message) to send [line](https://line.me/en/) message.
@@ -13,12 +15,10 @@ In `build.gradle`, apply **linepush** plugin, and setting your line-bot informat
1315
~~~groovy
1416
buildscript {
1517
repositories {
16-
maven {
17-
url "https://plugins.gradle.org/m2/"
18-
}
18+
jcenter()
1919
}
2020
dependencies {
21-
classpath "gradle.plugin.com.github.newnewcoder:linepush:1.0.0"
21+
classpath "com.github.newnewcoder:linepush:1.0.0"
2222
}
2323
}
2424
apply plugin: 'com.github.newnewcoder.linepush'

build.gradle

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,79 @@ group 'com.github.newnewcoder'
55

66
buildscript {
77
repositories {
8-
maven {
9-
url "https://plugins.gradle.org/m2/"
10-
}
8+
jcenter()
119
}
1210
dependencies {
13-
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1412
}
1513
}
16-
apply plugin: "com.gradle.plugin-publish"
14+
apply plugin: 'com.jfrog.bintray'
1715
apply plugin: 'groovy'
1816
apply plugin: 'maven'
17+
apply plugin: 'maven-publish'
1918

2019
repositories {
21-
jcenter()
2220
mavenCentral()
2321
}
22+
2423
ext {
25-
linebotVersion = '1.6.0'
24+
archivesBaseName = 'linepush-gradle-plugin'
25+
description = 'It\'s a gradle plugin using *line-bot message push api* to send line message.'
26+
}
27+
28+
task sourceJar(type: Jar, dependsOn: classes, description: 'Package source into jar') {
29+
classifier = 'sources'
30+
from sourceSets.main.allSource
31+
}
32+
33+
task groovydocJar(type: Jar, dependsOn: groovydoc, description: 'Package doc into jar') {
34+
classifier = 'groovydoc'
35+
from groovydoc.destinationDir
2636
}
37+
38+
artifacts {
39+
archives sourceJar, groovydocJar
40+
}
41+
2742
dependencies {
43+
def linebotVersion = '1.6.0'
2844
compile gradleApi()
2945
compile localGroovy()
3046
compile "com.linecorp.bot:line-bot-api-client:$linebotVersion"
3147

3248
testCompile 'junit:junit:4.11'
3349
}
3450

35-
pluginBundle {
36-
website = 'https://github.com/newnewcoder/linepush'
37-
vcsUrl = 'https://github.com/newnewcoder/linepush'
38-
tags = ['linepush']
39-
description = 'It\'s a gradle plugin using *line-bot message push api* to send line message.'
51+
publishing {
52+
publications {
53+
MyPublication(MavenPublication) {
54+
from components.java
55+
groupId = project.group
56+
artifactId = project.archivesBaseName
57+
version = project.version
58+
artifact sourceJar
59+
artifact groovydocJar
60+
}
61+
}
62+
}
4063

41-
plugins {
42-
linepushPlugin {
43-
id = "com.github.newnewcoder.linepush"
44-
displayName = 'Gradle LinePush plugin'
64+
bintray {
65+
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
66+
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
67+
publications = ['MyPublication']
68+
pkg {
69+
repo = 'generic'
70+
name = 'linepush-gradle-plugin'
71+
userOrg = user
72+
licenses = ['Apache-2.0']
73+
vcsUrl = 'https://github.com/newnewcoder/linepush'
74+
labels = ['linepush', 'gradle plugin']
75+
publish = true
76+
publicDownloadNumbers = true
77+
version {
78+
name = project.version
79+
desc = project.description
80+
released = new Date()
4581
}
4682
}
4783
}

sample/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
buildscript {
22
repositories {
3-
maven {
4-
url "https://plugins.gradle.org/m2/"
5-
}
3+
jcenter()
64
}
75
dependencies {
8-
classpath "gradle.plugin.com.github.newnewcoder:linepush:1.0.0"
6+
classpath "com.github.newnewcoder:linepush:1.0.0"
97
}
108
}
119
apply plugin: 'com.github.newnewcoder.linepush'

0 commit comments

Comments
 (0)