Hi,

I have to live with some proxy restrictions at work which are serious
pain. So I had to recreate several dependencies locally (via git
checkout). I non-intrusively switched all builds to gradle using
clojuresque Clojure plugin.

I can update a dependency by simply doing a new checkout in the repo
directories. Then I can choose to just rebuilt a single project or a
project + all it depends on or a project + all projects depending on
it. Specifying dependencies between the different projects is dead
simple.

The structure is like this:

Root
  + build.gradle
  + settings.gradle
  + .gradle
      + internal_repository
  + ring/...
  + moustache/...
  + hiccup/...

There is no change to the checked out code needed in order to make the
build work. The artifacts are published to the internal repository
from where they are shared between the builds. (Via classpath, not
copying or symlinking.)

Below is an excerpt for your reference of the build.gradle file to
give you an impression how it looks and feels like.

Hope that helps.

Sincerely
Meikel

build.gradle:
subprojects {
    usePlugin 'clojure'

    group = project.name

    configurations.compile.transitive = true

    compileClojure.dependsOn compileJava

    String localRepo = 'file:///some/local/repo/re/proxy/restrictions'

    sourceSets.main.clojure {
        srcDir 'src'
    }

    gradleHomeRepo(repositories)
    clojureSnapshotsRepo(repositories)
    repositories {
        mavenRepo name: 'local', urls: localRepo
        mavenCentral()
    }

    dependencies {
        compile 'org.clojure:clojure:1.1.0-master-SNAPSHOT'
        compile 'org.clojure:clojure-contrib:1.1.0-master-SNAPSHOT'
    }

    uploadArchives {
        repositories.mavenDeployer {
            repository(url: localRepo)
        }
    }
}

project(':hiccup') {
    version = '0.2.3'
}

project(':clj-stacktrace') {
    version = '0.1.1'
}

project(':ring:ring-core') {
    version = '0.2.0'
    group = 'ring'

    dependencies {
        compile 'commons-codec:commons-codec:1.4'
        compile 'commons-io:commons-io:1.4'
        compile 'commons-fileupload:commons-fileupload:1.2.1'
        compile 'org.mortbay.jetty:servlet-api-2.5:6.1.14'
    }
}

project(':ring:ring-devel') {
    version = '0.2.0'
    group = 'ring'

    dependencies {
        compile project(':ring:ring-core')
        compile project(':clj-html')
        compile project(':clj-stacktrace')
    }
}

project(':ring:ring-httpcore-adapter') {
    version = '0.2.0'
    group = 'ring'

    dependencies {
        compile 'org.apache.httpcomponents:httpcore:4.0.1'
        compile 'org.apache.httpcomponents:httpcore-nio:4.0.1'

        compile project(':ring:ring-core')
    }
}

project(':ring:ring-jetty-adapter') {
    version = '0.2.0'
    group = 'ring'

    dependencies {
        compile 'org.mortbay.jetty:jetty:6.1.14'
        compile 'org.mortbay.jetty:jetty-util:6.1.14'

        compile project(':ring:ring-core')
        compile project(':ring:ring-servlet')
    }
}

project(':ring:ring-servlet') {
    version = '0.2.0'
    group = 'ring'

    dependencies {
        compile 'org.mortbay.jetty:servlet-api-2.5:6.1.14'

        compile project(':ring:ring-core')
    }
}

project(':moustache') {
    version = '1.0.0-SNAPSHOT'

    dependencies {
        compile project(':ring:ring-core')
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to