Skip to content

Commit a51657d

Browse files
committed
imageCropper 07 add to jcenter
1 parent 2a160f6 commit a51657d

File tree

5 files changed

+101
-3
lines changed

5 files changed

+101
-3
lines changed

P01_ImageCropper/.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

P01_ImageCropper/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
## 实现步骤
1919

20+
在module的gradle
21+
```
22+
compile 'ch.ielse:imagecropper:1.0.0'
23+
```
24+
2025
首先在xml布局中
2126
```
2227
<FrameLayout

P01_ImageCropper/app/build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ android {
2020

2121
dependencies {
2222
compile 'com.android.support:appcompat-v7:23.3.0'
23-
compile project(':imagecropper')
23+
// compile project(':imagecropper')
24+
25+
compile 'ch.ielse:imagecropper:1.0.0'
2426
}

P01_ImageCropper/build.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,26 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.2'
8+
classpath 'com.android.tools.build:gradle:2.1.2'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
12+
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
14+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
15+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1216
}
1317
}
1418

1519
allprojects {
1620
repositories {
1721
jcenter()
1822
}
23+
24+
tasks.withType(Javadoc).all {
25+
enabled = false
26+
options.setEncoding('UTF-8')
27+
}
1928
}
2029

2130
task clean(type: Delete) {

P01_ImageCropper/imagecropper/build.gradle

+82
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
4+
5+
version = "1.0.0"
6+
group = "ch.ielse" // Maven Group ID for the artifact,一般填你唯一的包名
7+
def siteUrl = 'https://github.com/iielse/DemoProjects/tree/master/P01_ImageCropper' // 项目的主页
8+
def gitUrl = 'https://github.com/iielse/DemoProjects.git' // Git仓库的url
9+
10+
android {
11+
compileOptions {
12+
sourceCompatibility JavaVersion.VERSION_1_7
13+
targetCompatibility JavaVersion.VERSION_1_7
14+
}
15+
}
216

317
android {
418
compileSdkVersion 23
519
buildToolsVersion "23.0.2"
20+
resourcePrefix "imagecropper__"
621

722
defaultConfig {
823
minSdkVersion 14
@@ -19,6 +34,73 @@ android {
1934
}
2035
}
2136

37+
Properties properties = new Properties()
38+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
39+
40+
bintray {
41+
user = properties.getProperty("bintray.user")
42+
key = properties.getProperty("bintray.apikey")
43+
configurations = ['archives']
44+
pkg {
45+
repo = "maven"
46+
name = "imagecropper" //发布到JCenter上的项目名字
47+
websiteUrl = siteUrl
48+
vcsUrl = gitUrl
49+
licenses = ["Apache-2.0"]
50+
publish = true
51+
}
52+
}
53+
54+
install {
55+
repositories.mavenInstaller {
56+
// This generates POM.xml with proper parameters
57+
pom {
58+
project {
59+
packaging 'aar'
60+
// Add your description here
61+
name 'Android Widget ImageCropper' //项目描述
62+
url siteUrl
63+
// Set your license
64+
licenses {
65+
license {
66+
name 'The Apache Software License, Version 2.0'
67+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
68+
}
69+
}
70+
developers {
71+
developer {
72+
id 'iielse' //填写的一些基本信息
73+
name 'else'
74+
75+
}
76+
}
77+
scm {
78+
connection gitUrl
79+
developerConnection gitUrl
80+
url siteUrl
81+
}
82+
}
83+
}
84+
}
85+
}
86+
2287
dependencies {
2388
compile 'com.android.support:appcompat-v7:23.3.0'
2489
}
90+
91+
task sourcesJar(type: Jar) {
92+
from android.sourceSets.main.java.srcDirs
93+
classifier = 'sources'
94+
}
95+
task javadoc(type: Javadoc) {
96+
source = android.sourceSets.main.java.srcDirs
97+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
98+
}
99+
task javadocJar(type: Jar, dependsOn: javadoc) {
100+
classifier = 'javadoc'
101+
from javadoc.destinationDir
102+
}
103+
artifacts {
104+
archives javadocJar
105+
archives sourcesJar
106+
}

0 commit comments

Comments
 (0)