Skip to content

Commit 3284f9e

Browse files
author
梁任彦
committed
配置targetSdkVersion为25。
配送源码打包。
1 parent 602514f commit 3284f9e

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.1"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.3"
66
defaultConfig {
77
applicationId "com.donkingliang.headerviewadapterdemo"
8-
minSdkVersion 15
9-
targetSdkVersion 26
8+
minSdkVersion 14
9+
targetSdkVersion 25
1010
versionCode 1
1111
versionName "1.0"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -24,7 +24,7 @@ dependencies {
2424
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2525
exclude group: 'com.android.support', module: 'support-annotations'
2626
})
27-
compile 'com.android.support:appcompat-v7:26.+'
27+
compile 'com.android.support:appcompat-v7:25.3.1'
2828
compile 'com.android.support.constraint:constraint-layout:1.0.2'
2929
testCompile 'junit:junit:4.12'
3030

headerviewadapter/build.gradle

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
apply plugin: 'com.android.library'
2+
group='com.github.donkingliang' // 指定group,com.github.<用户名>
23

34
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.1"
5+
compileSdkVersion 25
6+
buildToolsVersion "25.0.3"
67

78
defaultConfig {
8-
minSdkVersion 15
9-
targetSdkVersion 26
9+
minSdkVersion 14
10+
targetSdkVersion 25
1011
versionCode 1
1112
versionName "1.0"
1213

@@ -26,7 +27,30 @@ dependencies {
2627
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2728
exclude group: 'com.android.support', module: 'support-annotations'
2829
})
29-
compile 'com.android.support:appcompat-v7:26.+'
30+
compile 'com.android.support:appcompat-v7:25.3.1'
3031
testCompile 'junit:junit:4.12'
31-
compile 'com.android.support:recyclerview-v7:26.+'
32+
compile 'com.android.support:recyclerview-v7:25.3.1'
3233
}
34+
35+
//---------------------------------------------
36+
// 指定编码
37+
tasks.withType(JavaCompile) {
38+
options.encoding = "UTF-8"
39+
}
40+
41+
// 打包源码
42+
task sourcesJar(type: Jar) {
43+
from android.sourceSets.main.java.srcDirs
44+
classifier = 'sources'
45+
}
46+
47+
task javadoc(type: Javadoc) {
48+
failOnError false
49+
source = android.sourceSets.main.java.sourceFiles
50+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
51+
classpath += configurations.compile
52+
}
53+
54+
artifacts {
55+
archives sourcesJar
56+
}

0 commit comments

Comments
 (0)