【问题标题】:Proguard and Library Projects that references other Library Projects引用其他图书馆项目的 Proguard 和图书馆项目
【发布时间】:2014-07-25 15:44:58
【问题描述】:

我们混淆了一个库项目并将其作为独立的 jar 文件分发。我们的图书馆以前不依赖于其他图书馆项目。但正如 google 宣布的那样,8 月 1 日之后所有新提交的应用程序都应使用 Advertising Id 作为设备标识符,这要求开发人员使用 Google Play Services Lib。

现在我们的库项目依赖于 google-play-services-lib,当我尝试对其进行混淆时,生成的 jar 文件包含 google-play-services-lib 的类文件,当一些开发人员同时使用我的library jar 和 google-play-services 作为引用的库项目。

我怎么能说 proguard 不在输出 jar 文件中包含来自 google-play-services.jar 的类文件?

谢谢

【问题讨论】:

    标签: android proguard library-project


    【解决方案1】:

    build.xml 中使用了以下自定义的 -post-compile 任务。 您只能在此处包含您想要包含在输出 jar 文件中的库 jar。

    <target name="-post-compile">
       <path id="project.all.jars.path" >           
           <!-- pathelement path="libs/android-support-v4.jar" ></pathelement -->
       </path>
       <echo level="info" >To be packaged jar: ${toString:project.all.jars.path}</echo>
    </target>
    

    【讨论】:

      猜你喜欢
      • 2016-02-05
      • 2012-11-09
      • 1970-01-01
      • 1970-01-01
      • 2016-12-08
      • 1970-01-01
      • 1970-01-01
      • 2012-06-14
      • 1970-01-01
      相关资源
      最近更新 更多