Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added type coercions to the Ant code.
- Loading branch information
Showing
6 changed files
with
78 additions
and
35 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,23 +1,18 @@ | ||
package org.bovinegenius.forge | ||
|
||
import org.bovinegenius.forge.impl.ForgeFactory | ||
import org.eclipse.aether.RepositorySystem | ||
|
||
trait Forge { | ||
def build(repoSystem: RepositorySystem = null) | ||
} | ||
|
||
object Forge { | ||
def apply(): org.bovinegenius.forge.impl.Forge = { | ||
// val parent = getClass.getClassLoader | ||
// val classLoader = new DynamicClassLoader(parent) | ||
// println("classloader: %s".format(classLoader)) | ||
// val forgeClass = classLoader.loadClass("org.bovinegenius.forge.impl.ForgeFactory") | ||
// val forgeObj = forgeClass.newInstance() //.asInstanceOf[ForgeFactory] | ||
// forgeClass.getMethod("defaultForge").invoke(forgeObj).asInstanceOf[org.bovinegenius.forge.impl.Forge] | ||
// Jar("org.apache.ant", "ant", "1.9.2").load() | ||
new org.bovinegenius.forge.impl.ForgeFactory().defaultForge | ||
// forgeObj.defaultForge | ||
} | ||
def apply(): Forge = ForgeFactory.defaultForge | ||
} | ||
|
||
def main(args: Array[String]) { | ||
val forge = Forge() | ||
forge.build(null) | ||
} | ||
object Main { | ||
def main(args: Array[String]): Unit = Forge().build() | ||
} | ||
|
||
|
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
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,4 @@ | ||
package org.bovinegenius.forge | ||
|
||
|
||
|