
sillyexceptions = 'sillyexceptions'
repotest = 'repotest'

/*
 * Copyright 2010 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * gradle_sourceforge:
 * - repotest
 * -- repotest
 * --- 1.0
 * ---- repotest-1.0.pom (-> testdep-1.0)
 *
 * - repotest
 * -- classifier
 * --- 1.0
 * ---- classifier-1.0.pom (-> classifier-dep-1.0)
 * ---- classifier-1.0-jdk14.jar
 * ---- classifier-1.0-jdk15.jar
 *
 * - repotest
 * -- classifier-dep
 * --- 1.0
 * ---- classifier-dep-1.0.pom
 * ---- classifier-dep-1.0.jar
 *
 * gradle_sourceforge2
 * - repotest
 * -- repotest
 * --- 1.0
 * ---- repotest-1.0.jar
 *
 * - testdep
 * -- testdep
 * --- 1.0
 * ---- testdep-1.0.pom
 * ---- testdep-1.0.jar
 *
 * - testdep2
 * -- testdep2
 * --- 1.0
 * ---- testdep2-1.0.jar
 * ---- testdep2-1.0.pom
 *
 * - jaronly
 * -- jaronly
 * --- 1.0
 * ---- jaronly-1.0.jar
 *
 * Maven Repo:
 *
 * - sillyexceptions
 * -- sillyexceptions
 * --- 1.0.1
 * ---- sillyexceptions-1.0.1.jar
 * ---- sillyexceptions-1.0.1.pom
 *
 * Transitive Dependencies
 *
 * repotest -> testdep
 * testdep -> testdep2
 */

configurations {
    test
}

repositories {
    mavenRepo(urls: ['http://gradle.sourceforge.net/repository/', 'http://gradle.sourceforge.net/otherrepo/']).allownomd = false
    mavenRepo(urls: 'http://gradle.sourceforge.net/otherrepo/')
    mavenCentral()
}

dependencies {
    test "$sillyexceptions:$sillyexceptions:1.0.1@jar", "$repotest:$repotest:1.0", "$repotest:classifier:1.0:jdk15", "jaronly:jaronly:1.0"
}

task retrieve << {
    delete buildDir
    delete new File(gradle.gradleUserHomeDir, "$ResolverContainer.DEFAULT_CACHE_DIR_NAME/$sillyexceptions")
    delete new File(gradle.gradleUserHomeDir, "$ResolverContainer.DEFAULT_CACHE_DIR_NAME/$repotest")
    delete new File(gradle.gradleUserHomeDir, "$ResolverContainer.DEFAULT_CACHE_DIR_NAME/testdep")
    delete new File(gradle.gradleUserHomeDir, "$ResolverContainer.DEFAULT_CACHE_DIR_NAME/testdep2")
    delete new File(gradle.gradleUserHomeDir, "$ResolverContainer.DEFAULT_CACHE_DIR_NAME/jaronly")
    copy {
        from configurations.test
        into buildDir
    }
}