org.gradle.api.java.archives.internal.DefaultManifest Java Examples
The following examples show how to use
org.gradle.api.java.archives.internal.DefaultManifest.
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: DefaultOsgiManifest.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
@Override public DefaultManifest getEffectiveManifest() { ContainedVersionAnalyzer analyzer = analyzerFactory.create(); DefaultManifest effectiveManifest = new DefaultManifest(null); try { setAnalyzerProperties(analyzer); Manifest osgiManifest = analyzer.calcManifest(); java.util.jar.Attributes attributes = osgiManifest.getMainAttributes(); for (Map.Entry<Object, Object> entry : attributes.entrySet()) { effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue())); } effectiveManifest.attributes(this.getAttributes()); for (Map.Entry<String, Attributes> ent : getSections().entrySet()) { effectiveManifest.attributes(ent.getValue(), ent.getKey()); } if (classesDir != null) { long mod = classesDir.lastModified(); if (mod > 0) { effectiveManifest.getAttributes().put(Analyzer.BND_LASTMODIFIED, mod); } } } catch (Exception e) { throw UncheckedException.throwAsUncheckedException(e); } return getEffectiveManifestInternal(effectiveManifest); }
Example #2
Source File: DefaultOsgiManifest.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
@Override public DefaultManifest getEffectiveManifest() { ContainedVersionAnalyzer analyzer = analyzerFactory.create(); DefaultManifest effectiveManifest = new DefaultManifest(null); try { setAnalyzerProperties(analyzer); Manifest osgiManifest = analyzer.calcManifest(); java.util.jar.Attributes attributes = osgiManifest.getMainAttributes(); for (Map.Entry<Object, Object> entry : attributes.entrySet()) { effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue())); } effectiveManifest.attributes(this.getAttributes()); for (Map.Entry<String, Attributes> ent : getSections().entrySet()) { effectiveManifest.attributes(ent.getValue(), ent.getKey()); } if (classesDir != null) { long mod = classesDir.lastModified(); if (mod > 0) { effectiveManifest.getAttributes().put(Analyzer.BND_LASTMODIFIED, mod); } } } catch (Exception e) { throw UncheckedException.throwAsUncheckedException(e); } return getEffectiveManifestInternal(effectiveManifest); }
Example #3
Source File: DefaultOsgiManifest.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
@Override public DefaultManifest getEffectiveManifest() { ContainedVersionAnalyzer analyzer = analyzerFactory.create(); DefaultManifest effectiveManifest = new DefaultManifest(null); try { setAnalyzerProperties(analyzer); Manifest osgiManifest = analyzer.calcManifest(); java.util.jar.Attributes attributes = osgiManifest.getMainAttributes(); for (Map.Entry<Object, Object> entry : attributes.entrySet()) { effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue())); } effectiveManifest.attributes(this.getAttributes()); for (Map.Entry<String, Attributes> ent : getSections().entrySet()) { effectiveManifest.attributes(ent.getValue(), ent.getKey()); } if (classesDir != null) { long mod = classesDir.lastModified(); if (mod > 0) { effectiveManifest.getAttributes().put(Analyzer.BND_LASTMODIFIED, mod); } } } catch (Exception e) { throw UncheckedException.throwAsUncheckedException(e); } return getEffectiveManifestInternal(effectiveManifest); }
Example #4
Source File: DefaultOsgiManifest.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
@Override public DefaultManifest getEffectiveManifest() { ContainedVersionAnalyzer analyzer = analyzerFactory.create(); DefaultManifest effectiveManifest = new DefaultManifest(null); try { setAnalyzerProperties(analyzer); Manifest osgiManifest = analyzer.calcManifest(); java.util.jar.Attributes attributes = osgiManifest.getMainAttributes(); for (Map.Entry<Object, Object> entry : attributes.entrySet()) { effectiveManifest.attributes(WrapUtil.toMap(entry.getKey().toString(), (String) entry.getValue())); } effectiveManifest.attributes(this.getAttributes()); for (Map.Entry<String, Attributes> ent : getSections().entrySet()) { effectiveManifest.attributes(ent.getValue(), ent.getKey()); } if (classesDir != null) { long mod = classesDir.lastModified(); if (mod > 0) { effectiveManifest.getAttributes().put(Analyzer.BND_LASTMODIFIED, mod); } } } catch (Exception e) { throw UncheckedException.throwAsUncheckedException(e); } return getEffectiveManifestInternal(effectiveManifest); }