-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of the factory pattern.
- Loading branch information
Showing
4 changed files
with
99 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
group = 'net.ricebean.tools.pointcloud' | ||
archivesBaseName = "PointCloudCrust" | ||
version = '0.1' | ||
|
||
repositories { | ||
jcenter() | ||
|
@@ -7,3 +13,68 @@ repositories { | |
dependencies { | ||
testCompile 'junit:junit:4.12' | ||
} | ||
|
||
artifacts { | ||
archives jar | ||
|
||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from tasks.javadoc.destinationDir | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
classifier = 'sources' | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'PointCloudCrust' | ||
packaging 'jar' | ||
// optionally artifactId can be defined here | ||
description 'Implementation of the PointCloudCrust Algorithm.' | ||
url 'https://github.com/ricebean-net/PointCloudCrust' | ||
|
||
scm { | ||
connection 'scm:[email protected]:ricebean-net/PointCloudCrust.git' | ||
developerConnection 'scm:[email protected]:ricebean-net/PointCloudCrust.git' | ||
url 'https://github.com/ricebean-net/PointCloudCrust.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The Apache License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'meixi' | ||
name 'Stefan Meissner' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/net/ricebean/tools/pointcloud/PointCloudCrustFactory.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,20 @@ | ||
package net.ricebean.tools.pointcloud; | ||
|
||
import net.ricebean.tools.pointcloud.model.Vector; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Factory class for getting an PointCloudCrust implementation. | ||
*/ | ||
public class PointCloudCrustFactory { | ||
|
||
/** | ||
* Get a new instance of the PointCloudCrust Algorithm. | ||
* @param pointCloud The point cloud for initializing. | ||
* @return A initialized instance of the point cloud crust. | ||
*/ | ||
public static PointCloudCrust newInstance(List<Vector> pointCloud) { | ||
return new PointCloudCrustImpl(pointCloud); | ||
} | ||
} |
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