fat-aar-android icon indicating copy to clipboard operation
fat-aar-android copied to clipboard

怎么把Kotlin源码打入aar

Open DIY-green opened this issue 4 years ago • 7 comments

Describe the issue 使用目前最新版本插件,无法将Kotlin源码打入aar

Build Environment

  • Operating System: [e.g. MacOS]
  • Gradle Plugin Version: [e.g. 4.1.0]
  • Gradle Version: [e.g. 6.5]
  • Fat-aar Version: [e.g. 1.3.1]

DIY-green avatar Jan 17 '22 07:01 DIY-green

同问

Dboy233 avatar May 11 '22 03:05 Dboy233

同问

JackyKeke avatar Aug 15 '22 03:08 JackyKeke

你们解决了吗这个问题

biginsect avatar Aug 29 '22 11:08 biginsect

你们解决了吗这个问题

Dboy233 avatar Aug 31 '22 01:08 Dboy233

我打进去了 kotlin中的so库也打进去了 单例实例companion 找不到

87620089 avatar Jan 08 '23 08:01 87620089

def module_list = [
        project("xxxxxxx"),
]

def path_suffix = '/src/main/java'

task sourceJar(type: Jar) {
    def source_dirs = []
    module_list.forEach {
        source_dirs.add(it.getProjectDir().absolutePath + path_suffix)
    }
    from source_dirs
    archiveClassifier = "sources"
}

publishing {
    publications {
        release(MavenPublication) {

            groupId = 'xxx'
            artifactId = 'xxx'
            version = "xxx"

            artifact sourceJar

            afterEvaluate {
                from components.release
            }
        }
    }
}

dependencies {
    module_list.forEach {
        embed(it)
    }
}

kapaseker avatar Oct 30 '23 02:10 kapaseker

感谢你的来信,我会及时处理。祝工作顺利,万事如意

JackyKeke avatar Oct 30 '23 02:10 JackyKeke