diff --git a/app/build.gradle b/app/build.gradle index 4af0110..7ade61b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 - buildToolsVersion "26.0.1" + compileSdkVersion 25 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.donkingliang.headerviewadapterdemo" - minSdkVersion 15 - targetSdkVersion 26 + minSdkVersion 14 + targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -24,7 +24,7 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:26.+' + compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' diff --git a/headerviewadapter/build.gradle b/headerviewadapter/build.gradle index 2406aea..019c94c 100644 --- a/headerviewadapter/build.gradle +++ b/headerviewadapter/build.gradle @@ -1,12 +1,13 @@ apply plugin: 'com.android.library' +group='com.github.donkingliang' // 指定group,com.github.<用户名> android { - compileSdkVersion 26 - buildToolsVersion "26.0.1" + compileSdkVersion 25 + buildToolsVersion "25.0.3" defaultConfig { - minSdkVersion 15 - targetSdkVersion 26 + minSdkVersion 14 + targetSdkVersion 25 versionCode 1 versionName "1.0" @@ -26,7 +27,30 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:26.+' + compile 'com.android.support:appcompat-v7:25.3.1' testCompile 'junit:junit:4.12' - compile 'com.android.support:recyclerview-v7:26.+' + compile 'com.android.support:recyclerview-v7:25.3.1' } + +//--------------------------------------------- +// 指定编码 +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +// 打包源码 +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +task javadoc(type: Javadoc) { + failOnError false + source = android.sourceSets.main.java.sourceFiles + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + classpath += configurations.compile +} + +artifacts { + archives sourcesJar +} \ No newline at end of file