分享apklib文件,但隐藏源$ C ​​$ C这可能吗? [英] Share apklib file but hide the source code Is it possible?

查看:189
本文介绍了分享apklib文件,但隐藏源$ C ​​$ C这可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个使用Android的Maven的插件创建的Andr​​oid库项目。这导致.apklib快照的产生。该快照已全部Java源代码code和资源的Andr​​oid项目。

So I have Android library projects which are built using android-maven-plugin. This results in the generation of .apklib snapshot. This snapshot has all the java source code and resources for that android project.

我想分享这个.apklib与其他用户,但不希望在Java源代码code妥协。这是不是可能呢?我读到使用ProGuard混淆在.apklib非公开code,但问题是,当我使用proguard.cfg它产生的混淆code .jar文件,但它也产生了的.apklib文件在pom.xml中有所有的源$ C ​​$ C在它定义的组ID。

I want to share this .apklib with other users but don't want to compromise on the java source code. Is this something possible? I read about using proguard to obfuscate non public code in .apklib but the problem is that when I use proguard.cfg it generates a .jar file with the obfuscated code but it also generates the .apklib file in the group id as defined in pom.xml which has all the source code in it.

我的理解是,Maven的需要.apklib以及所有源$ C ​​$ C建设的主要.apk文件。

My understanding is that Maven need .apklib and all source code to build the main .apk file.

因此​​,既然我们可以分享apklib文件,但隐藏源$ C ​​$ C的吗?

So with that can we share apklib file but hide the source code in it?

推荐答案

我没有尝试它自己。但是,这里有一个想法

I didn't try it myself. However, here is an idea

a)汇编的code成jar

a) Compile your code into a jar

b)将这个罐子是apklib的一部分(这样罐子+资源将作为apklib的一部分)

b) Put this jar as part of apklib (this way jar + resources will be delivered as part of apklib)

这篇关于分享apklib文件,但隐藏源$ C ​​$ C这可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆