# Passing configuration properties to custom plugin

**URL:** <https://discuss.gradle.org/t/passing-configuration-properties-to-custom-plugin/22316>\
**Category:** Help/Discuss\
**Created:** [April 12, 2017, 7:01pm UTC](https://discuss.gradle.org/t/passing-configuration-properties-to-custom-plugin/22316 "2017-04-12T19:01:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![koala421](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koala421](https://discuss.gradle.org/u/koala421)\
**Post date:** [April 12, 2017, 7:01pm UTC](https://discuss.gradle.org/t/passing-configuration-properties-to-custom-plugin/22316/1 "2017-04-12T19:01:00Z")

</div>

I recently built a maven plugin and used MavenProject to build a jar by usingPreformatted text

MavenProject project; project.addCompileSourceRoot(Path to project Root); in my java file

I was wondering if there is a similar functionality within Gradle.

For instance, in my pom file i have configurations that I apply to my plugin and this in turn builds a jar with specific class files based on the configs.

POM plugin:

 dictFile\>FIX44-bolt.xmlmyproject.api myproject.api.field \</configuration This would create a jar with package classes within the jar namely package myproject.api and myproject.api.fields

I want similar functionality within my build.gradle file:

buildscript {  
repositories {  
maven {  
url uri(‘C:/git/repo/’)  
}  
mavenLocal()

}

dependencies {  
classpath group: ‘myproject.api’, name: ‘quick-plugin’,  
version: ‘1.0-SNAPSHOT’  
}  
}

apply plugin: ‘quick-plugin’

 FIX44-bolt.xml myproject.api myproject.api.field \</configuration

This would create a jar with package classes within the jar namely package myproject.api and myproject.api.fields

I want similar functionality within my build.gradle file:

buildscript {  
repositories {  
maven {  
url uri(‘C:/git/repo/’)  
}  
mavenLocal()

}

dependencies {  
classpath group: ‘myproject.api’, name: ‘quick-plugin’,  
version: ‘1.0-SNAPSHOT’  
}  
}

apply plugin: ‘quick-plugin’
