MCPcopy Create free account
hub / github.com/SquirrelJME/SquirrelJME / BuildProject

Class BuildProject

NewBootstrap.java:785–1237  ·  view source on GitHub ↗

This represents a single project which may be built. @since 2016/10/27

Source from the content-addressed store, hash-verified

783 * @since 2016/10/27
784 */
785 public class BuildProject
786 {
787 /** The project base path. */
788 protected final Path basepath;
789
790 /** The project name. */
791 protected final String name;
792
793 /** The output path for this JAR. */
794 protected final Path jarout;
795
796 /** Dependencies of this build project. */
797 protected final Set<String> depends;
798
799 /** In compilation? */
800 private volatile boolean _incompile;
801
802 /** Was the source date calculated? */
803 private volatile long _sourcedate =
804 Long.MIN_VALUE;
805
806 /**
807 * Initializes the build project.
808 *
809 * @param __b The project base path.
810 * @param __mp The manifest path.
811 * @throws IOException On read/write errors.
812 * @throws NullPointerException On null arguments.
813 * @since 2016/10/27
814 */
815 BuildProject(Path __b, Path __mp)
816 throws IOException, NullPointerException
817 {
818 // Check
819 if (__b == null || __mp == null)
820 throw new NullPointerException("NARG");
821
822 // Set
823 this.basepath = __b;
824
825 // Load the manifest
826 Manifest man;
827 try (InputStream in = Channels.newInputStream(
828 FileChannel.open(__mp, StandardOpenOption.READ)))
829 {
830 man = new Manifest(in);
831 }
832
833 // Handle main attributes
834 Attributes attr = man.getMainAttributes();
835
836 // The project name depends on the uppermost name of the directory
837 String name;
838 this.name = (name = __correctProjectName(
839 __b.getFileName().toString()));
840
841 // Where is this output?
842 this.jarout = NewBootstrap.this.buildjarout.resolve(name + ".jar");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected