apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' group = 'com.github.HuanTanSheng' android { compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" vectorDrawables.useSupportLibrary = true } } dependencies { implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.androidxConstraintVersion" implementation "androidx.appcompat:appcompat:$rootProject.ext.androidxVersion" implementation "com.google.android.material:material:$rootProject.ext.androidxVersion" implementation "androidx.recyclerview:recyclerview:1.1.0" implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0' implementation 'com.github.chrisbanes:PhotoView:2.3.0' implementation project(path: ':xlibrary') } //// 指定编码 //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 //} // 打包文档 //task javadocJar(type: Jar, dependsOn: javadoc) { // classifier = 'javadoc' // from javadoc.destinationDir //} artifacts { archives sourcesJar // archives javadocJar }