apply plugin: 'java-library' repositories { jcenter() } dependencies { implementation 'org.json:json:20160807' implementation 'org.jsoup:jsoup:1.9.2' implementation 'org.mozilla:rhino:1.7.7.1' testImplementation 'junit:junit:4.12' sourceCompatibility = 1.7 targetCompatibility = 1.7 } task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } artifacts { archives sourcesJar }