Skip to content

Commit

Permalink
V1.0.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
smuyyh committed Nov 30, 2017
1 parent c0d0f4f commit 7b53417
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.iml
.gradle
/.idea
/local.properties
/.idea/libraries
/.idea/modules.xml
Expand Down
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# JsonViewer

3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha04'


classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
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
7 changes: 4 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 26


resourcePrefix "jsonviewer"

defaultConfig {
minSdkVersion 11
targetSdkVersion 26
versionCode 1
versionName "1.0"
versionName "1.0.0"
}

buildTypes {
Expand All @@ -32,3 +31,5 @@ dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
}

apply from: 'publish.gradle'
71 changes: 71 additions & 0 deletions library/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

def siteUrl = 'https://github.com/smuyyh/JsonViewer' // Git项目主页
def gitUrl = 'https://github.com/smuyyh/JsonViewer.git' // Git仓库url
group = "com.yuyh.json" // 一般为包名
version = "1.0.0" // 版本号

install {
repositories.mavenInstaller {
// 生成POM.xml
pom {
project {
packaging 'aar'
name 'Android Json Viewer' // 项目描述
artifactId 'jsonviewer'
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer { // 开发者个人信息
id 'smuyyh'
name 'smuyyh'
email 'smuyyh@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
options.encoding = "UTF-8" // 设置编码,否则中文可能会提示出错
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven" // 发布到Maven库
name = "JsonViewer" // 发布到JCenter上的项目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}

0 comments on commit 7b53417

Please sign in to comment.