-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #539 from simpligility/feature-manifest-merger-v2
Manifest merger v2
- Loading branch information
Showing
5 changed files
with
431 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/main/java/com/jayway/maven/plugins/android/common/MavenManifestDependency.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.jayway.maven.plugins.android.common; | ||
|
||
import com.android.builder.dependency.ManifestDependency; | ||
|
||
import java.io.File; | ||
import java.util.List; | ||
|
||
public class MavenManifestDependency implements ManifestDependency | ||
{ | ||
private File manifestFile; | ||
private String name; | ||
private List<MavenManifestDependency> manifestDependencies; | ||
|
||
public MavenManifestDependency( | ||
File manifestFile, String name, List<MavenManifestDependency> manifestDependencies ) | ||
{ | ||
this.manifestFile = manifestFile; | ||
this.name = name; | ||
this.manifestDependencies = manifestDependencies; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
@Override | ||
public List<? extends ManifestDependency> getManifestDependencies() | ||
{ | ||
return manifestDependencies; | ||
} | ||
|
||
@Override | ||
public File getManifest() | ||
{ | ||
return manifestFile; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,10 @@ | |
* {@link com.jayway.maven.plugins.android.standalonemojos.ManifestUpdateMojo} and used there. | ||
* | ||
* @author Manfred Moser <[email protected]> | ||
* @deprecated Use ManifestMerger {@link com.jayway.maven.plugins.android.configuration.ManifestMerger} in combination | ||
* with {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo} | ||
*/ | ||
@Deprecated | ||
public class Manifest | ||
{ | ||
/** | ||
|
77 changes: 77 additions & 0 deletions
77
src/main/java/com/jayway/maven/plugins/android/configuration/ManifestMerger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package com.jayway.maven.plugins.android.configuration; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* Configuration for the manifest update. This class is only the definition of the parameters that are shadowed in | ||
* {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo} and used there. | ||
* | ||
* @author Benoit Billington | ||
*/ | ||
public class ManifestMerger | ||
{ | ||
|
||
/** | ||
* Mirror of {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo#manifestVersionName}. | ||
*/ | ||
protected String versionName; | ||
|
||
/** | ||
* Mirror of {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo#manifestVersionCode}. | ||
*/ | ||
protected Integer versionCode; | ||
|
||
/** | ||
* Mirror of | ||
* {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo#manifestUsesSdk} | ||
*/ | ||
protected UsesSdk usesSdk; | ||
|
||
/** | ||
* Mirror of {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo | ||
* #manifestVersionCodeUpdateFromVersion}. | ||
*/ | ||
protected Boolean versionCodeUpdateFromVersion; | ||
|
||
/** | ||
* Mirror of {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo | ||
* #manifestMergeLibraries}. | ||
*/ | ||
protected Boolean mergeLibraries; | ||
|
||
/** | ||
* Mirror of {@link com.jayway.maven.plugins.android.standalonemojos.ManifestMergerMojo | ||
* #manifestMergeReportFile}. | ||
*/ | ||
protected File mergeReportFile; | ||
|
||
public String getVersionName() | ||
{ | ||
return versionName; | ||
} | ||
|
||
public Integer getVersionCode() | ||
{ | ||
return versionCode; | ||
} | ||
|
||
public UsesSdk getUsesSdk() | ||
{ | ||
return usesSdk; | ||
} | ||
|
||
public Boolean getVersionCodeUpdateFromVersion() | ||
{ | ||
return versionCodeUpdateFromVersion; | ||
} | ||
|
||
public Boolean getMergeLibraries() | ||
{ | ||
return mergeLibraries; | ||
} | ||
|
||
public File getMergeReportFile() | ||
{ | ||
return mergeReportFile; | ||
} | ||
} |
Oops, something went wrong.