Skip to content

Commit

Permalink
add deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
iceAnson committed Nov 27, 2017
1 parent 2b575d4 commit 8218cc8
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
1 change: 1 addition & 0 deletions summer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ dependencies {
compile 'com.google.auto.service:auto-service:1.0-rc2'
}
//apply from: 'mvn.gradle'
apply from: 'p.gradle'

21 changes: 18 additions & 3 deletions summer/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
GROUP_ID=com.meiyou.framework

#你的Groupid
GROUP_ID=com.meiyou
#你的artifactid
POM_ARTIFACT_ID=summer
DEPLOY_VERSION=0.0.11-SNAPSHOT
PACKAGE_FORMAT=jar
#你的deployversion
DEPLOY_VERSION=1.0.4
#你要发布的类型,jar和aar可选
PACKAGE_FORMAT=jar
#项目名字
PROJ_NAME=Summer
PROJ_VCSURL=https://github.com/zongwu233/Summer.git
PROJ_WEBSITEURL=https://github.com/zongwu233/Summer
PROJ_ISSUETRACKERURL=
PROJ_DESCRIPTION=/Summer

DEVELOPER_ID=meetyou
DEVELOPER_NAME=meetyou
DEVELOPER_EMAIL=[email protected]
94 changes: 94 additions & 0 deletions summer/p.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

group = GROUP_ID
version = DEPLOY_VERSION
project.archivesBaseName = POM_ARTIFACT_ID

task sourcesJar(type: Jar) {
if(PACKAGE_FORMAT.equals('jar') == true){
from sourceSets.main.allJava
}else{
from android.sourceSets.main.java.srcDirs
}
classifier = 'sources'
}

artifacts {

archives sourcesJar
}

def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id DEVELOPER_ID
name DEVELOPER_NAME
email DEVELOPER_EMAIL
}
}

scm {
url PROJ_WEBSITEURL
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId GROUP_ID
artifactId POM_ARTIFACT_ID
version DEPLOY_VERSION
pom.withXml {
def root = asNode()
root.appendNode('packaging', PACKAGE_FORMAT)
root.children().last() + pomConfig
}
}
}
}

Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
properties.load( inputStream )

def BINTRAY_U = properties.getProperty( 'BINTRAY_USER' )
def BINTRAY_KEY = properties.getProperty( 'BINTRAY_KEY' ) ;

bintray {

user = BINTRAY_U
key = BINTRAY_KEY

configurations = ['archives']

dryRun = false
publish = true

pkg {
repo = 'maven'
name = PROJ_NAME
licenses = ['Apache-2.0']
vcsUrl = PROJ_VCSURL
websiteUrl = PROJ_WEBSITEURL
issueTrackerUrl = PROJ_ISSUETRACKERURL
publicDownloadNumbers = true
version {
name = DEPLOY_VERSION
desc = PROJ_DESCRIPTION
vcsTag = DEPLOY_VERSION

gpg {
sign = true
}
}
}
}
2 changes: 1 addition & 1 deletion summerCompiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ dependencies {
compile 'com.google.auto.service:auto-service:1.0-rc2'
compile project(':summer')
}
apply from: 'mvn.gradle'
apply from: 'p.gradle'

20 changes: 17 additions & 3 deletions summerCompiler/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
GROUP_ID=com.meiyou.framework
#你的Groupid
GROUP_ID=com.meiyou
#你的artifactid
POM_ARTIFACT_ID=summer-compiler
DEPLOY_VERSION=0.0.11-SNAPSHOT
PACKAGE_FORMAT=jar
#你的deployversion
DEPLOY_VERSION=1.0.4
#你要发布的类型,jar和aar可选
PACKAGE_FORMAT=jar
#项目名字
PROJ_NAME=SummerCompiler
PROJ_VCSURL=https://github.com/zongwu233/Summer.git
PROJ_WEBSITEURL=https://github.com/zongwu233/Summer
PROJ_ISSUETRACKERURL=
PROJ_DESCRIPTION=/SummerCompiler

DEVELOPER_ID=meetyou
DEVELOPER_NAME=meetyou
DEVELOPER_EMAIL=[email protected]
94 changes: 94 additions & 0 deletions summerCompiler/p.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

group = GROUP_ID
version = DEPLOY_VERSION
project.archivesBaseName = POM_ARTIFACT_ID

task sourcesJar(type: Jar) {
if(PACKAGE_FORMAT.equals('jar') == true){
from sourceSets.main.allJava
}else{
from android.sourceSets.main.java.srcDirs
}
classifier = 'sources'
}

artifacts {

archives sourcesJar
}

def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id DEVELOPER_ID
name DEVELOPER_NAME
email DEVELOPER_EMAIL
}
}

scm {
url PROJ_WEBSITEURL
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId GROUP_ID
artifactId POM_ARTIFACT_ID
version DEPLOY_VERSION
pom.withXml {
def root = asNode()
root.appendNode('packaging', PACKAGE_FORMAT)
root.children().last() + pomConfig
}
}
}
}

Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
properties.load( inputStream )

def BINTRAY_U = properties.getProperty( 'BINTRAY_USER' )
def BINTRAY_KEY = properties.getProperty( 'BINTRAY_KEY' ) ;

bintray {

user = BINTRAY_U
key = BINTRAY_KEY

configurations = ['archives']

dryRun = false
publish = true

pkg {
repo = 'maven'
name = PROJ_NAME
licenses = ['Apache-2.0']
vcsUrl = PROJ_VCSURL
websiteUrl = PROJ_WEBSITEURL
issueTrackerUrl = PROJ_ISSUETRACKERURL
publicDownloadNumbers = true
version {
name = DEPLOY_VERSION
desc = PROJ_DESCRIPTION
vcsTag = DEPLOY_VERSION

gpg {
sign = true
}
}
}
}

0 comments on commit 8218cc8

Please sign in to comment.