Skip to content

Commit

Permalink
Merge pull request #45 from jbaruch/master
Browse files Browse the repository at this point in the history
3.3 (debian) support added, build on Gradle 2.0
  • Loading branch information
Baruch Sadogursky committed Aug 11, 2014
2 parents 1c53204 + b12473e commit 1002b3c
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ public interface Repository {
boolean isEnableGemsSupport();

boolean isEnableNpmSupport();

boolean isEnableDebianSupport();

boolean isDebianTrivialLayout();
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*/
public interface RepositoryBuilder<B extends RepositoryBuilder, R extends Repository> {

B enableDebianSupport(boolean enableDebianSupport);

B description(String description);

B excludesPattern(String excludesPattern);
Expand All @@ -25,4 +27,6 @@ public interface RepositoryBuilder<B extends RepositoryBuilder, R extends Reposi
B enableNuGetSupport(boolean enableNuGetSupport);

B enableGemsSupport(boolean enableGemsSupport);

B debianTrivialLayout(boolean debianTrivialLayout);
}
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ buildscript {
jcenter()
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.2.2')
classpath(group: 'eu.appsatori', name: 'gradle-fatjar-plugin', version: '0.2-rc1')
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.0.1')
classpath(group: 'eu.appsatori', name: 'gradle-fatjar-plugin', version: '0.3')
}
}

allprojects {

apply plugin: 'maven-publish'
apply plugin: 'artifactory-publish'
apply plugin: 'com.jfrog.artifactory'

group = 'org.jfrog.artifactory.client'
version = currentVersion
Expand Down Expand Up @@ -67,7 +67,7 @@ subprojects {

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
from destinationDir
}

// add javadoc/source jar tasks as artifacts
Expand Down Expand Up @@ -130,5 +130,6 @@ subprojects {
}

task wrapper(type: Wrapper) {
gradleVersion = '1.10'
gradleVersion = '2.0'
distributionUrl = 'https://services.gradle.org/distributions-snapshots/gradle-2.0-all.zip'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Tue Jan 14 17:33:08 IST 2014
#Sun Aug 10 16:38:57 IDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-rc-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-all.zip
2 changes: 1 addition & 1 deletion ning-services/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'groovy'
apply plugin: 'fatjar'
apply plugin: 'eu.appsatori.fatjar'

dependencies {
compile project(':artifactory-java-client-services')
Expand Down
2 changes: 1 addition & 1 deletion services/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'groovy'
apply plugin: 'fatjar'
apply plugin: 'eu.appsatori.fatjar'

dependencies {
compile project(':artifactory-java-client-api')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LocalRepositoryBuilderImpl extends NonVirtualRepositoryBuilderBase<LocalRe
}

LocalRepository build() {
return new LocalRepositoryImpl(description, excludesPattern, includesPattern, key, notes, blackedOut, handleReleases, handleSnapshots, maxUniqueSnapshots, propertySets, snapshotVersionBehavior, suppressPomConsistencyChecks, checksumPolicyType, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, calculateYumMetadata, yumRootDepth, enableGemsSupport, enableNpmSupport)
return new LocalRepositoryImpl(description, excludesPattern, includesPattern, key, notes, blackedOut, handleReleases, handleSnapshots, maxUniqueSnapshots, propertySets, snapshotVersionBehavior, suppressPomConsistencyChecks, checksumPolicyType, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, calculateYumMetadata, yumRootDepth, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,6 @@ class RemoteRepositoryBuilderImpl extends NonVirtualRepositoryBuilderBase<Remote
snapshotVersionBehavior, suppressPomConsistencyChecks, failedRetrievalCachePeriodSecs, fetchJarsEagerly, fetchSourcesEagerly, hardFail, localAddress, missedRetrievalCachePeriodSecs,
offline, password, proxy, remoteRepoChecksumPolicyType, retrievalCachePeriodSecs, shareConfiguration, socketTimeoutMillis, storeArtifactsLocally, synchronizeProperties,
unusedArtifactsCleanupEnabled, unusedArtifactsCleanupPeriodHours, url, username, repoLayoutRef, enableNuGetSupport, assumedOfflinePeriodSecs, archiveBrowsingEnabled,
listRemoteFolderItems, rejectInvalidJars, p2Support, enableGemsSupport, enableNpmSupport)
listRemoteFolderItems, rejectInvalidJars, p2Support, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ abstract class RepositoryBuilderBase<B extends RepositoryBuilder, R extends Repo
protected boolean enableNuGetSupport = false
protected boolean enableGemsSupport = false
protected boolean enableNpmSupport = false
protected boolean enableDebianSupport = false
protected boolean debianTrivialLayout = false

@Override
B description(String description) {
Expand Down Expand Up @@ -66,4 +68,16 @@ abstract class RepositoryBuilderBase<B extends RepositoryBuilder, R extends Repo
this.enableGemsSupport = enableGemsSupport
this as B
}

@Override
B enableDebianSupport(boolean enableDebianSupport) {
this.enableDebianSupport = enableDebianSupport
this as B
}

@Override
B debianTrivialLayout(boolean debianTrivialLayout) {
this.debianTrivialLayout = debianTrivialLayout
this as B
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class VirtualRepositoryBuilderImpl extends RepositoryBuilderBase<VirtualReposito
}

VirtualRepository build() {
new VirtualRepositoryImpl(description, excludesPattern, includesPattern, key, notes, artifactoryRequestsCanRetrieveRemoteArtifacts, keyPair, pomRepositoryReferencesCleanupPolicy, repositories, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport)
new VirtualRepositoryImpl(description, excludesPattern, includesPattern, key, notes, artifactoryRequestsCanRetrieveRemoteArtifacts, keyPair, pomRepositoryReferencesCleanupPolicy, repositories, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ private LocalRepositoryImpl() {
repoLayoutRef = MAVEN_2_REPO_LAYOUT;
}

private LocalRepositoryImpl(String description, String excludesPattern, String includesPattern, String key, String notes, boolean blackedOut, boolean handleReleases, boolean handleSnapshots, int maxUniqueSnapshots, List<String> propertySets, SnapshotVersionBehavior snapshotVersionBehavior, boolean suppressPomConsistencyChecks, ChecksumPolicyType checksumPolicyType, String repoLayoutRef, boolean enableNuGetSupport, boolean archiveBrowsingEnabled, boolean calculateYumMetadata, int yumRootDepth, boolean enableGemsSupport, boolean enableNpmSupport) {
super(description, excludesPattern, includesPattern, key, notes, blackedOut, handleReleases, handleSnapshots, maxUniqueSnapshots, propertySets, snapshotVersionBehavior, suppressPomConsistencyChecks, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, enableGemsSupport, enableNpmSupport);
private LocalRepositoryImpl(String description, String excludesPattern, String includesPattern, String key, String notes, boolean blackedOut, boolean handleReleases, boolean handleSnapshots, int maxUniqueSnapshots, List<String> propertySets, SnapshotVersionBehavior snapshotVersionBehavior, boolean suppressPomConsistencyChecks, ChecksumPolicyType checksumPolicyType, String repoLayoutRef, boolean enableNuGetSupport, boolean archiveBrowsingEnabled, boolean calculateYumMetadata, int yumRootDepth, boolean enableGemsSupport, boolean enableNpmSupport, boolean enableDebianSupport, boolean debianTrivialLayout) {
super(description, excludesPattern, includesPattern, key, notes, blackedOut, handleReleases, handleSnapshots, maxUniqueSnapshots, propertySets, snapshotVersionBehavior, suppressPomConsistencyChecks, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout);
this.checksumPolicyType = checksumPolicyType;
this.calculateYumMetadata = calculateYumMetadata;
this.yumRootDepth = yumRootDepth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public abstract class NonVirtualRepositoryBase extends RepositoryBase implements
protected NonVirtualRepositoryBase() {
}

protected NonVirtualRepositoryBase(String description, String excludesPattern, String includesPattern, String key, String notes, boolean blackedOut, boolean handleReleases, boolean handleSnapshots, int maxUniqueSnapshots, List<String> propertySets, SnapshotVersionBehavior snapshotVersionBehavior, boolean suppressPomConsistencyChecks, String repoLayoutRef, boolean enableNuGetSupport, boolean archiveBrowsingEnabled, boolean enableGemsSupport, boolean enableNpmSupport) {
super(description, excludesPattern, includesPattern, key, notes, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport);
protected NonVirtualRepositoryBase(String description, String excludesPattern, String includesPattern, String key, String notes, boolean blackedOut, boolean handleReleases, boolean handleSnapshots, int maxUniqueSnapshots, List<String> propertySets, SnapshotVersionBehavior snapshotVersionBehavior, boolean suppressPomConsistencyChecks, String repoLayoutRef, boolean enableNuGetSupport, boolean archiveBrowsingEnabled, boolean enableGemsSupport, boolean enableNpmSupport, boolean enableDebianSupport, boolean debianTrivialLayout) {
super(description, excludesPattern, includesPattern, key, notes, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout);
this.blackedOut = blackedOut;
this.handleReleases = handleReleases;
this.handleSnapshots = handleSnapshots;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ private RemoteRepositoryImpl() {
int missedRetrievalCachePeriodSecs, boolean offline, String password, String proxy, RemoteRepoChecksumPolicyType remoteRepoChecksumPolicyType,
int retrievalCachePeriodSecs, boolean shareConfiguration, int socketTimeoutMillis, boolean storeArtifactsLocally, boolean synchronizeProperties,
boolean unusedArtifactsCleanupEnabled, int unusedArtifactsCleanupPeriodHours, String url, String username, String repoLayoutRef, boolean enableNuGetSupport,
long assumedOfflinePeriodSecs, boolean archiveBrowsingEnabled, boolean listRemoteFolderItems, boolean rejectInvalidJars, boolean p2Support, boolean enableGemsSupport, boolean enableNpmSupport) {
long assumedOfflinePeriodSecs, boolean archiveBrowsingEnabled, boolean listRemoteFolderItems, boolean rejectInvalidJars, boolean p2Support,
boolean enableGemsSupport, boolean enableNpmSupport, boolean enableDebianSupport, boolean debianTrivialLayout) {
super(description, excludesPattern, includesPattern, key, notes, blackedOut, handleReleases, handleSnapshots, maxUniqueSnapshots, propertySets, snapshotVersionBehavior,
suppressPomConsistencyChecks, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, enableGemsSupport, enableNpmSupport);
suppressPomConsistencyChecks, repoLayoutRef, enableNuGetSupport, archiveBrowsingEnabled, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout);
this.failedRetrievalCachePeriodSecs = failedRetrievalCachePeriodSecs;
this.fetchJarsEagerly = fetchJarsEagerly;
this.fetchSourcesEagerly = fetchSourcesEagerly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ public abstract class RepositoryBase implements Repository {
protected boolean enableNuGetSupport;
protected boolean enableGemsSupport;
protected boolean enableNpmSupport;
protected boolean enableDebianSupport;
protected boolean debianTrivialLayout;


protected RepositoryBase() {
}

protected RepositoryBase(String description, String excludesPattern, String includesPattern, String key, String notes, String repoLayoutRef, boolean enableNuGetSupport, boolean enableGemsSupport, boolean enableNpmSupport) {
protected RepositoryBase(String description, String excludesPattern, String includesPattern, String key, String notes, String repoLayoutRef,
boolean enableNuGetSupport, boolean enableGemsSupport, boolean enableNpmSupport, boolean enableDebianSupport, boolean debianTrivialLayout) {
this.description = description;
this.excludesPattern = excludesPattern;
this.includesPattern = includesPattern;
Expand All @@ -33,6 +36,7 @@ protected RepositoryBase(String description, String excludesPattern, String incl
this.enableNuGetSupport = enableNuGetSupport;
this.enableGemsSupport = enableGemsSupport;
this.enableNpmSupport = enableNpmSupport;
this.enableDebianSupport = enableDebianSupport;
}

@Override
Expand Down Expand Up @@ -154,7 +158,28 @@ private void setEnableGemsSupport(boolean enableGemsSupport) {
}

@Override
public boolean isEnableNpmSupport() { return enableNpmSupport; }
public boolean isEnableNpmSupport() {
return enableNpmSupport;
}

@Override
public boolean isEnableDebianSupport() {
return enableDebianSupport;
}

@Override
public boolean isDebianTrivialLayout() {
return debianTrivialLayout;
}

public void setEnableNpmSupport(boolean enableNpmSupport) {
this.enableNpmSupport = enableNpmSupport;
}

public void setEnableNpmSupport(boolean enableNpmSupport) { this.enableNpmSupport = enableNpmSupport; }
public void setEnableDebianSupport(boolean enableDebianSupport) {
this.enableDebianSupport = enableDebianSupport;
}
public void setDebianTrivialLayout(boolean debianTrivialLayout) {
this.debianTrivialLayout = debianTrivialLayout;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ public class VirtualRepositoryImpl extends RepositoryBase implements VirtualRepo
private VirtualRepositoryImpl() {
}

private VirtualRepositoryImpl(String description, String excludesPattern, String includesPattern, String key, String notes, boolean artifactoryRequestsCanRetrieveRemoteArtifacts, String keyPair, PomRepositoryReferencesCleanupPolicy pomRepositoryReferencesCleanupPolicy, List<String> repositories, String repoLayoutRef, boolean enableNuGetSupport, boolean enableGemsSupport, boolean enableNpmSupport) {
super(description, excludesPattern, includesPattern, key, notes, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport);
private VirtualRepositoryImpl(String description, String excludesPattern, String includesPattern, String key, String notes,
boolean artifactoryRequestsCanRetrieveRemoteArtifacts, String keyPair,
PomRepositoryReferencesCleanupPolicy pomRepositoryReferencesCleanupPolicy, List<String> repositories, String repoLayoutRef,
boolean enableNuGetSupport, boolean enableGemsSupport, boolean enableNpmSupport, boolean enableDebianSupport, boolean debianTrivialLayout) {
super(description, excludesPattern, includesPattern, key, notes, repoLayoutRef, enableNuGetSupport, enableGemsSupport, enableNpmSupport, enableDebianSupport, debianTrivialLayout);
this.artifactoryRequestsCanRetrieveRemoteArtifacts = artifactoryRequestsCanRetrieveRemoteArtifacts;
this.keyPair = keyPair;
this.pomRepositoryReferencesCleanupPolicy = pomRepositoryReferencesCleanupPolicy;
Expand Down

0 comments on commit 1002b3c

Please sign in to comment.