org.gradle.api.java.archives.Manifest Java Examples

The following examples show how to use org.gradle.api.java.archives.Manifest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultManifestMergeSpec.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultManifest merge(Manifest baseManifest, FileResolver fileResolver) {
    DefaultManifest mergedManifest = new DefaultManifest(fileResolver);
    mergedManifest.getAttributes().putAll(baseManifest.getAttributes());
    mergedManifest.getSections().putAll(baseManifest.getSections());
    for (Object mergePath : mergePaths) {
        DefaultManifest manifestToMerge = createManifest(mergePath, fileResolver);
        mergedManifest = mergeManifest(mergedManifest, manifestToMerge, fileResolver);
    }
    return mergedManifest;
}
 
Example #2
Source File: DefaultManifestMergeSpec.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultManifest merge(Manifest baseManifest, FileResolver fileResolver) {
    DefaultManifest mergedManifest = new DefaultManifest(fileResolver);
    mergedManifest.getAttributes().putAll(baseManifest.getAttributes());
    mergedManifest.getSections().putAll(baseManifest.getSections());
    for (Object mergePath : mergePaths) {
        DefaultManifest manifestToMerge = createManifest(mergePath, fileResolver);
        mergedManifest = mergeManifest(mergedManifest, manifestToMerge, fileResolver);
    }
    return mergedManifest;
}
 
Example #3
Source File: DefaultManifestMergeSpec.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultManifest merge(Manifest baseManifest, FileResolver fileResolver) {
    DefaultManifest mergedManifest = new DefaultManifest(fileResolver);
    mergedManifest.getAttributes().putAll(baseManifest.getAttributes());
    mergedManifest.getSections().putAll(baseManifest.getSections());
    for (Object mergePath : mergePaths) {
        DefaultManifest manifestToMerge = createManifest(mergePath, fileResolver);
        mergedManifest = mergeManifest(mergedManifest, manifestToMerge, fileResolver);
    }
    return mergedManifest;
}
 
Example #4
Source File: DefaultManifestMergeSpec.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultManifest merge(Manifest baseManifest, FileResolver fileResolver) {
    DefaultManifest mergedManifest = new DefaultManifest(fileResolver);
    mergedManifest.getAttributes().putAll(baseManifest.getAttributes());
    mergedManifest.getSections().putAll(baseManifest.getSections());
    for (Object mergePath : mergePaths) {
        DefaultManifest manifestToMerge = createManifest(mergePath, fileResolver);
        mergedManifest = mergeManifest(mergedManifest, manifestToMerge, fileResolver);
    }
    return mergedManifest;
}
 
Example #5
Source File: JarConfigurator.java    From saros with GNU General Public License v2.0 5 votes vote down vote up
public void createBundleJar(File manifestFile) {
  Jar jarTask = (Jar) project.getTasks().findByName(JAR_TASK_NAME);

  if (jarTask == null)
    throw new GradleException("Unable to find the gradle task: " + JAR_TASK_NAME);

  jarTask.manifest((Manifest mf) -> mf.from(manifestFile));
  SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
  jarTask.from(sourceSets.getByName(JAVA_MAIN_SOURCE_SET_NAME).getOutput());
  jarTask.into(
      JAR_LIB_DESTINATION,
      (CopySpec cs) -> cs.from(project.getConfigurations().getByName(RELEASE_CONFIG_NAME)));
}
 
Example #6
Source File: Jar.java    From pushfish-android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the manifest for this JAR archive.
 *
 * @return The manifest
 */
public Manifest getManifest() {
    return manifest;
}
 
Example #7
Source File: Jar.java    From pushfish-android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Sets the manifest for this JAR archive.
 *
 * @param manifest The manifest. May be null.
 */
public void setManifest(Manifest manifest) {
    this.manifest = manifest;
}
 
Example #8
Source File: Jar.java    From javaide with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Returns the manifest for this JAR archive.
 *
 * @return The manifest
 */
@Internal
public Manifest getManifest() {
    return manifest;
}
 
Example #9
Source File: Jar.java    From javaide with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Sets the manifest for this JAR archive.
 *
 * @param manifest The manifest. May be null.
 */
public void setManifest(Manifest manifest) {
    this.manifest = manifest;
}
 
Example #10
Source File: Jar.java    From javaide with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Configures the manifest for this JAR archive.
 *
 * <p>The given action is executed to configure the manifest.</p>
 *
 * @param configureAction The action.
 * @return This.
 * @since 3.5
 */
public Jar manifest(Action<? super Manifest> configureAction) {
    configureAction.execute(forceManifest());
    return this;
}
 
Example #11
Source File: Jar.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the manifest for this JAR archive.
 *
 * @return The manifest
 */
public Manifest getManifest() {
    return manifest;
}
 
Example #12
Source File: Jar.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Sets the manifest for this JAR archive.
 *
 * @param manifest The manifest. May be null.
 */
public void setManifest(Manifest manifest) {
    this.manifest = manifest;
}