Skip to content

Commit

Permalink
maven
Browse files Browse the repository at this point in the history
  • Loading branch information
admin authored and admin committed Aug 18, 2017
1 parent a75be1d commit f1c2792
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Expand Up @@ -19,6 +19,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}

dependencies {
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Expand Up @@ -6,9 +6,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}

Expand Down
Empty file modified gradlew 100644 → 100755
Empty file.
83 changes: 82 additions & 1 deletion smartcropperlib/build.gradle
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
versionName "1.0.0"

externalNativeBuild {
cmake {
Expand All @@ -29,8 +29,89 @@ android {
path "CMakeLists.txt"
}
}
lintOptions {
abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
// This is the library version used when deploying the artifact
version = "1.0.0"

def siteUrl = "https://github.com/pqpo/SmartCropper"
def gitUrl = "https://github.com/pqpo/SmartCropper.git"
group = "me.pqpo.smartcropper" // Maven Group ID for the artifact,一般填你唯一的包名
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'A library for cropping image in a smart way that can identify the border and correct the cropped image'
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'pqpo'
name 'pqpo'
email 'pqponet@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) {
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"
name = "SmartCropper" //发布到JCenter上的项目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
javadoc { //jav doc采用utf-8编码否则会报“GBK的不可映射字符”错误
options{
encoding "UTF-8"
charSet 'UTF-8'
}
}
Expand Up @@ -151,7 +151,7 @@ public void setImageBitmap(Bitmap bm) {

/**
* 设置待裁剪图片并显示
* @param bmp
* @param bmp 待裁剪图片
*/
public void setImageToCrop(Bitmap bmp) {
setImageBitmap(bmp);
Expand Down

0 comments on commit f1c2792

Please sign in to comment.