Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
merged from development for Beta6
Browse files Browse the repository at this point in the history
  • Loading branch information
ysb33r committed Nov 5, 2015
2 parents 984168a + 67a025d commit 63b7d9f
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 9 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {

allprojects {
ext {
versionModifier = 'beta5'
versionModifier = 'beta6'
versionNumber = '1.0'
modulesWithGroovyDoc = [
'dsl',
Expand Down Expand Up @@ -54,6 +54,9 @@ subprojects {
ext {
vfsVersion = '2.0'
groovyVer = '[2.1,2.3.9]'
jackrabbitVer = '1.6.5' // '2.11.1'
jettyVer = '8.1.5.v20120716' //'9.3.5.v20151012'
slf4jVer = '1.7.5'
bintrayRepo = 'grysb33r'
bintrayUser = 'ysb33r'
bintrayLicense = 'Apache-2.0'
Expand Down Expand Up @@ -99,7 +102,7 @@ configure(subprojects.findAll { ! ['jlan','test-servers','docs'].contains(it.nam
testCompile 'commons-io:commons-io:2.4'
testCompile 'commons-net:commons-net:3.+'
testRuntime 'commons-httpclient:commons-httpclient:3.1'
testRuntime 'org.slf4j:slf4j-simple:1.7.5'
testRuntime "org.slf4j:slf4j-simple:${slf4jVer}"


testCompile ('org.spockframework:spock-core:1.0-groovy-2.3') {
Expand Down
3 changes: 2 additions & 1 deletion cmdline/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ dependencies {
runtime 'commons-httpclient:commons-httpclient:3.1'
runtime 'org.slf4j:slf4j-simple:1.7.5'
runtime 'com.jcraft:jsch:0.1.48'
compile project(':dsl')
compile project(':groovy-vfs')
// compile project(':dsl')
runtime project(':smb-provider')
runtime project(':cloud-provider-core')
}
Expand Down
3 changes: 2 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ asciidoctor {
}

attributes revnumber: "${version}",
dslSrcRoot : "${project(':dsl').projectDir}/src",
// dslSrcRoot : "${project(':dsl').projectDir}/src",
dslSrcRoot : "${project(':groovy-vfs').projectDir}/src",
gradleSrcRoot : "${project(':gradle-plugin').projectDir}/src",
smbSrcRoot : "${project(':smb-provider').projectDir}/src",
cloudSrcRoot : "${project(':cloud-provider-core').projectDir}/src",
Expand Down
69 changes: 67 additions & 2 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency

// ============================================================================
// (C) Copyright Schalk W. Cronje 2013
//
Expand All @@ -17,11 +19,13 @@ buildscript {
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
classpath "org.ysb33r.gradle:gradletest:0.5.4"
}
}

apply plugin : 'com.gradle.plugin-publish'
apply plugin : 'org.ysb33r.gradletest'

group = 'org.ysb33r.gradle'
archivesBaseName = 'vfs-gradle-plugin'
Expand All @@ -32,19 +36,26 @@ ext {
bintrayDescription = 'This is a plugin for Gradle that utilises the Groovy VFS DSL'
bintrayTags = ['gradle','groovy','vfs','groovy-vfs']
bintrayAttributes = [ 'gradle-plugin' : "org.ysb33r.vfs:${group}:${archivesBaseName}" ]

dslProject = dependencies.project( path:':groovy-vfs',configuration:'default')
}

configurations.all { exclude module: 'groovy-all' }

dependencies {
compile project( path:':dsl',configuration:'default')
compile dslProject
// compile project( path:':dsl',configuration:'default')
compile gradleApi()
compile localGroovy()

compile 'org.slf4j:jcl-over-slf4j:1.7.2'

testCompile project(':test-servers')

// gradleTest project( path:':dsl',configuration:'default')
gradleTest dslProject
gradleTest 'commons-httpclient:commons-httpclient:3.1'

}


Expand Down Expand Up @@ -85,3 +96,57 @@ pluginBundle {
publishPlugins {
onlyIf { !version.endsWith("SNAPSHOT") }
}

gradleTest {
versions '2.0' ,'2.2', '2.3', '2.5', '2.8'

onlyIf { !gradle.startParameter.isOffline() }
}

task foo << {

def addDependency = { mavenDeps, dep, scope ->

println "+++ ${dep}"

if(dep instanceof DefaultProjectDependency) {
println " ---- ${(dep as DefaultProjectDependency).dependencyProject.archivesBaseName}"
}
def mavenDep = new org.gradle.mvn3.org.apache.maven.model.Dependency()
mavenDep.setGroupId(dep.getGroup());
mavenDep.setArtifactId(dep.getName());
mavenDep.setVersion(dep.getVersion());
mavenDep.setScope(scope);

println " *** ${mavenDep}"
if (!dep.isTransitive()) {
LOGGER.warn(format("Dependency %s:%s:%s is marked as non-transitive, but this is not"
+ "supported by the underlying Maven publishing mechanism",
dep.getGroup(), dep.getName(), dep.getVersion()));
}
Set<ExcludeRule> excludeRules = dep.getExcludeRules();
if (excludeRules != null) {
for (ExcludeRule e : excludeRules) {
def mavenEx = new org.gradle.mvn3.org.apache.maven.model.Exclusion();
mavenEx.setGroupId(e.getGroup());
mavenEx.setArtifactId(e.getModule());
mavenDep.addExclusion(mavenEx);
}
}
mavenDeps.add(mavenDep);
}
def addDependencies = { mavenDeps, config, scope ->
for(org.gradle.api.artifacts.Dependency dep : config.getDependencies()) {
if(dep instanceof ModuleDependency) {
addDependency(mavenDeps, (ModuleDependency) dep, scope);
}
}
}

def compile = configurations.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME)
List<Dependency> mavenDeps = new ArrayList<Dependency>();
addDependencies(mavenDeps, compile, org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer.COMPILE)

println mavenDeps
}

34 changes: 34 additions & 0 deletions gradle-plugin/src/gradleTest/downloadFiles/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import org.gradle.internal.os.OperatingSystem

buildscript {
dependencies {
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:%%VERSION%%'
classpath fileTree(dir : "../../repo", include : '*.jar')
}
}

apply plugin : 'org.ysb33r.vfs'

ext {
gvfsGithubRoot = 'https://github.com/ysb33r/groovy-vfs/archive'
}

task copyCustom {
mkdir "${buildDir}/${name}"
vfs {
cp "${gvfsGithubRoot}/development.zip", file("${buildDir}/${name}"),
overwrite : true
}
}

import org.ysb33r.gradle.vfs.tasks.VfsCopy
task copyTask( type : VfsCopy ) {
from "${gvfsGithubRoot}/master.zip"

into file("${buildDir}/${name}")
}

task runGradleTest {
dependsOn copyCustom, copyTask
}

11 changes: 9 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@
//
// ============================================================================

rootProject.name = 'groovy-vfs'
rootProject.name = 'groovy-vfs-project'

include 'test-servers'
include 'dsl'
include 'gradle-plugin'
include 'jlan'
//include 'cpio-provider'
include 'smb-provider'
include 'cmdline'
include 'cloud-provider-core'
include 'docs'

//include 'dsl'
//include 'groovy-vfs'
//project(':groovy-vfs').projectDir = file('dsl')
include 'dsl'
project(':dsl').name = 'groovy-vfs'

//rootProject.children.find { it.name = 'dsl' } .name = 'groovy-vfs'
3 changes: 2 additions & 1 deletion smb-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies {
compile "org.apache.commons:commons-vfs2:${vfsVersion}"
compile 'jcifs:jcifs:1.3.17'

testCompile project(':dsl')
// testCompile project(':dsl')
testCompile project(':groovy-vfs')
testCompile fileTree( dir : "${project(':jlan').buildDir}/libs", include: '*.jar' )
}

Expand Down

0 comments on commit 63b7d9f

Please sign in to comment.