apply plugin: 'com.android.library'

android { compileSdkVersion findProperty('android.compileSdkVersion').toInteger()

defaultConfig{
    targetSdkVersion  findProperty('android.targetSdkVersion').toInteger()
}

lintOptions {
    abortOnError false
}
buildTypes {
    release {
        minifyEnabled false
    }
}

}

dependencies { testImplementation 'junit:junit:${project.property('junit.version')}' testImplementation 'org.robolectric:robolectric:${project.property('robolectric.version')}' }

import org.apache.tools.ant.filters.* task copyFiles(type: Copy) { from 'src/main/filtered/org/osmdroid' into 'src/main/java/org/osmdroid' filter(ReplaceTokens, tokens: [ 'pom.version': project.property('pom.version'), 'date': new Date().toString() ]) }

afterEvaluate { publishing {

    publications {
        release(MavenPublication) {
            from components.release
            groupId project.property('pom.groupId')
            artifactId project.name
            version = project.property('pom.version')
            pom {
                description =  project.description
                url = project.property('pom.url')

                //scm, organization and developers are injected via other mechanisms

                licenses {
                    license {
                        name=project.property('pom.licenses.license.0.name');
                        url=project.property('pom.licenses.license.0.url');
                        distribution==project.property('pom.licenses.license.0.distribution');
                    }

                }
            }
        }
    }
}

}

task androidSourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs }

artifacts { // archives packageReleaseJar archives androidSourcesJar

} preBuild.dependsOn(copyFiles)

Android OpenStreetMap Library for Easy Map Display - Compatible with Android Studio 3.5 and Below

原文地址: https://www.cveoy.top/t/topic/oY9g 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录