RoCE BALBOA:开源FPGA实现的高性能RDMA协议栈
2026/5/28 21:11:15
背景是有个sdk项目,最近我需要接入它使用。在接入的时候遇到了一些问题,所以有本文。
sdk项目依赖了三个子模块,大约是这样的:
dependencies{implementation(project(":module-A"))implementation(project(":module-B"))implementation(project(":module-C"))}我加了点代码publish到我新创建的maven服务。
这时候我发现这三个项目都不会发布到maven上。这几个项目我都不熟悉,特别是他们都定义了多个productFlavors。
这种情况怎么简单合成一个repo给我自己使用呢?
android多aar合并
android{ buildTypes{ release { minifyEnabled true } } }大约就是自己写脚本合并,使用python,和项目无关,不用收到agp版本的制约。
但是这个写了脚本我后面也不一定会用到,我就在想有没有其他的方式。
https://github.com/aasitnikov/fat-aar-android
kezong/fat-aar-android 这个没维护了,只是支持到AGP3.0.找到一些它的issue,发现有一个下游的分支还在更新。
aasitnikov/fat-aar-android 下游这个支持到 agp 8.13
我试了一下,发现 存在问题:
fused-library
这个也存在一些问题:
不过总体是可以用的,可以这样使用:
build.gradle.kts的文件dependencies{include(project(":module-A"))include(project(":module-B"))include(project(":module-C"))}step by step的说明见这里 add-fused-library-module
发布,直接publish就好
./gradlew clean :myFusedLibrary:publishandroid.experimental.fusedLibrarySupport=trueto thegradle.propertiesfile.include(":myFusedLibrary")to thesettings.gradle.ktsfile.android-fusedlibrary = { id = "com.android.fused-library", version.ref = "agp" }under the[plugins]section in thegradle/libs.versions.tomlfile.alias(libs.plugins.android.fusedlibrary) apply falsein the plugins block in the top levelbuild.gradle.ktsfile.myFusedLibrarymodule, create a new directory called myFusedLibrary (right-click ‘My Application’ > New > Directory).build.gradle.ktsfile in the myFusedLibrary module (right-click the myFusedLibrary module > New > File).myFusedLibrary/build.gradle.ktsfile:plugins{alias(libs.plugins.android.fusedlibrary)`maven-publish`}valbuildTime=java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))androidFusedLibrary{namespace="org.yeshen.fusedlibrary"minSdk=21}dependencies{include(project(":module-A"))include(project(":module-B"))include(project(":module-C"))}publishing{publications{register<MavenPublication>("release"){groupId="org.yeshen.fusedlibrary"artifactId="awesome"version="1.0.$buildTime"from(components["fusedLibraryComponent"])}}repositories{maven{url=uri("file://${rootDir}/../yeshen/file_release")name="Local"}}}本系列其他文章