| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- apply plugin: 'com.android.library'
- apply plugin: 'maven-publish'
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-kapt'
- // https://github.com/sky-uk/gradle-maven-plugin
- //apply from: "https://gitee.com/woyiqiankun/gradle-maven-plugin/raw/master/gradle-mavenizer.gradle"
- android {
- compileSdkVersion 32
- buildToolsVersion "32.0.0"
- defaultConfig {
- minSdkVersion 19
- targetSdkVersion 32
- versionCode 122011
- versionName "1.2201.1"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles 'consumer-rules.pro'
- }
- buildTypes {
- release {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- }
- tasks.withType(JavaCompile) {
- options.encoding = 'UTF-8'
- }
- task androidJavadocs(type: Javadoc) {
- failOnError false
- title = "hgsoftloglibrarytwo ${project.version} API"
- description "Generates Javadoc"
- source = android.sourceSets.main.java.srcDirs
- classpath += files(android.bootClasspath)
- android.libraryVariants.all { variant ->
- if (variant.name == 'release') {
- owner.classpath += variant.javaCompileProvider.get().classpath
- }
- }
- exclude '**/R.html', '**/R.*.html', '**/index.html', '**/*.kt'
- options {
- windowTitle("hgsoftloglibrarytwo ${project.version} Reference")
- locale = 'zh_CN'
- encoding = 'UTF-8'
- charSet = 'UTF-8'
- links("http://docs.oracle.com/javase/8/docs/api/")
- linksOffline("http://d.android.com/reference", "${android.sdkDirectory}/docs/reference")
- setMemberLevel(JavadocMemberLevel.PUBLIC)
- }
- }
- task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- archiveClassifier.convention('javadoc')
- archiveClassifier.set('javadoc')
- from androidJavadocs.destinationDir
- }
- task androidSourcesJar(type: Jar) {
- archiveClassifier.convention('sources')
- archiveClassifier.set('sources')
- from android.sourceSets.main.java.srcDirs
- }
- afterEvaluate {
- publishing {
- publications {
- // Creates a Maven publication called "release".
- mavenPublish(MavenPublication) {
- // Applies the component for the release build variant.
- from components.release
- artifact androidSourcesJar
- artifact androidJavadocsJar
- // You can then customize attributes of the publication as shown below.
- groupId = 'com.hgsoft.app'
- artifactId = 'loglibrarytwo'
- version = '1.2201.1'
- }
- }
- repositories {
- maven {
- credentials {
- username 'yinxueqin'
- password 'hgits1024'
- }
- url = 'https://nexus.hgits.cn/nexus/repository/hgsoft/'
- }
- }
- repositories {
- maven {
- credentials {
- username '60de898e6da2f73831c32a9d'
- password 'G-O=rDpLTK7B'
- }
- url = 'https://packages.aliyun.com/maven/repository/2117453-release-bMZITa/'
- }
- }
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- compileOnly 'androidx.appcompat:appcompat:1.4.2'
- api 'com.github.fengzhizi715.SAF-Kotlin-log:core:2.6.8'
- api 'com.github.fengzhizi715.SAF-Kotlin-log:file:2.6.8'
- api 'com.github.fengzhizi715.SAF-Kotlin-log:extension:2.6.8'
- api 'com.github.fengzhizi715.SAF-Kotlin-log:gson:2.6.8'
- api 'net.lingala.zip4j:zip4j:2.1.3'
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- }
|