# Best approach to create dependencies from non-java code (sql scripts)?

**URL:** <https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831>\
**Category:** Old Forum Archive\
**Created:** [August 18, 2014, 2:52pm UTC](https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831 "2014-08-18T14:52:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil\_swenson](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://discuss.gradle.org/u/phil_swenson)\
**Post date:** [August 18, 2014, 2:52pm UTC](https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831/1 "2014-08-18T14:52:00Z")

</div>

I have a bunch of sql scripts and associated xml config files in a legacy project… I want to upload these scripts to artifactory so I can declare them as dependencies (right now we have to go through an awful process to get the scripts and execute them).

So I have a directory structure that lives in a different project that I don’t have write access to. I want to use gradle to take sql and xml resources from this structure and publish them to artifactory.

What is the best approach for doing this? Should I just zip up the resources and publish them? That’s what I’m thinking… if that is approach, could someone point me to an example of publishing arbitrary zip files in a manner that I can declare a dependency on them?

Thanks phil

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [August 18, 2014, 2:54pm UTC](https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831/2 "2014-08-18T14:54:00Z")

</div>

A simple solution is to apply the java plugin and put them in src/main/resorces.

The resultant file would be a jar rather than a zip

---

<div class="post-metadata">

**Author:** ![phil\_swenson](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://discuss.gradle.org/u/phil_swenson)\
**Post date:** [August 18, 2014, 3:03pm UTC](https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831/3 "2014-08-18T15:03:00Z")

</div>

I could do this, but seems awkward to have to copy all the files into another directory structure just to publish…

Perhaps I could configure source sets to point at the pre-existing directory structure… I’ll look at that.

But I have a feeling there is more direct route of simply zipping up directories and publishing them…

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [August 18, 2014, 4:08pm UTC](https://discuss.gradle.org/t/best-approach-to-create-dependencies-from-non-java-code-sql-scripts/5831/4 "2014-08-18T16:08:00Z")

</div>

See [http://www.gradle.org/docs/current/userguide/artifact\_management.html](http://www.gradle.org/docs/current/userguide/artifact_management.html)
