Note that there are some explanatory texts on larger screens.

plurals
  1. POIncluding dagger generated sources in an apklib
    text
    copied!<p>I have a mavenized apklib which uses dagger (1.1.0) internally. The maven build generates the <code>annotations</code> folder inside the build output folder with the appropriate adapter classes. However, these are not included in the generated apklib.</p> <p>What's the correct configuration for the build process to include the generated sources inside the apklib? </p> <p>I'm using maven v3.0.4, android-maven-plugin v3.6.0 and the maven-compiler-plugin v3.1</p> <p><strong>Edit: Here's my <code>pom.xml</code></strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.xxx&lt;/groupId&gt; &lt;artifactId&gt;yyy&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;packaging&gt;apklib&lt;/packaging&gt; &lt;properties&gt; &lt;maven.build.timestamp.format&gt;yyMMdddHHmm&lt;/maven.build.timestamp.format&gt; &lt;android.version&gt;4.3&lt;/android.version&gt; &lt;versionCode&gt;${maven.build.timestamp}&lt;/versionCode&gt; &lt;android.sdk.platform&gt;18&lt;/android.sdk.platform&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;!-- Other dependencies... --&gt; &lt;dependency&gt; &lt;groupId&gt;com.squareup.dagger&lt;/groupId&gt; &lt;artifactId&gt;dagger&lt;/artifactId&gt; &lt;version&gt;1.1.0&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.squareup.dagger&lt;/groupId&gt; &lt;artifactId&gt;dagger-compiler&lt;/artifactId&gt; &lt;version&gt;1.1.0&lt;/version&gt; &lt;optional&gt;true&lt;/optional&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;3.6.0&lt;/version&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.squareup.dagger&lt;/groupId&gt; &lt;artifactId&gt;dagger-compiler&lt;/artifactId&gt; &lt;version&gt;1.1.0&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.1&lt;/version&gt; &lt;configuration&gt; &lt;source&gt;1.6&lt;/source&gt; &lt;target&gt;1.6&lt;/target&gt; &lt;encoding&gt;UTF-8&lt;/encoding&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload