Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
ysb33r committed Sep 30, 2017
2 parents bd7812b + e3bc051 commit 9b493d2
Show file tree
Hide file tree
Showing 26 changed files with 263 additions and 132 deletions.
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@

language: groovy

install:
- ./gradlew -S clean --info
sudo: true

install: true

script:
- ./gradlew -S build gradleTest --info
- ./gradlew -S clean build --console=plain --info

jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
- openjdk6

os:
- linux

env:
- TERM=dumb

#after_success: ./gradlew coveralls -PbintrayUser= -PbintrayApiKey
33 changes: 24 additions & 9 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
= CHANGELOG
:issue: link:https://github.com/ysb33r/ivypot-gradle-plugin/issues/

== 0.4 - Roadmap
== 0.5 - Roadmap

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/12[Issue #12] - Make default layout 'gradle'.
=== Bugs

* {issue}28[#28] - Unable to create task extending org.ysb33r.gradle.ivypot.OfflineRepositorySync

=== Breaking changes

* Minimum supported version is Gradle 2.8

=== Compatibility

* Gradle compatibility tested 2.8 - 4.2

== 0.4

* {issue}12[#12] - Make default layout 'gradle'.

== 0.3.7

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/10[Issue #11] - Patterns for writing artifacts is now configurable.
* {issue}11[#11] - Patterns for writing artifacts is now configurable.

== 0.3.6

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/10[Issue #10] - Fixes issues that was suppose to be fixed by https://github.com/ysb33r/ivypot-gradle-plugin/issues/8[Issue #9].
* {issue}10[#10] - Fixes issues that was suppose to be fixed by {issue}9[#9].
* Compatibility check up to Gradle 2.11

== 0.3.5

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/8[Issue #9] - Cannot use pattern-based Ivy Resolver since Gradle 2.3.
* {issue}9[#9] - Cannot use pattern-based Ivy Resolver since Gradle 2.3.

== 0.3.4

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/8[Issue #8] - Transitive dependencies are not copied to local repository.
* {issue}8[#8] - Transitive dependencies are not copied to local repository.

== 0.3.3 (Avoid this release)

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/7[Issue #7] - When using two `OfflineRepositorySync` tasks, the build fails.
* {issue}7[#7] - When using two `OfflineRepositorySync` tasks, the build fails.

== 0.3.2

* https://github.com/ysb33r/ivypot-gradle-plugin/issues/5[Issue #5] - Don't mix cache data with artifacts.
* https://github.com/ysb33r/ivypot-gradle-plugin/issues/6[Issue #6] - Specifying ivy repositories with only a URL does not work.
* {issue}5[#5] - Don't mix cache data with artifacts.
* {issue}6[#6] - Specifying ivy repositories with only a URL does not work.

== 0.3.1

Expand Down
30 changes: 19 additions & 11 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
= IvyPot - A Gradle plugin for Off-line Repositories
:revnumber: 0.5

Not all development teams have the luxury of relying on Maven Central, Bintray for day to day development. Some of them
are still fortunate to proxy public repositories via in-house Artifactory or Nexus instances. Others have even more
strict requirements including the ability to be able to build an isolated environment. This plugin is for them. It allows
for public dependencies, including transitive dependencies, to be downloaded in a controlled manner and the internal
security processes to be applied to the binary files before committing them to an internal storage area.

As from 0.5 the minimum supported Gradle version in 2.8.

== Previous versions

* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_4_0[Release 0.4.0]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_3_7[Release 0.3.7]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_3_6[Release 0.3.6]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_3_5[Release 0.3.5]
Expand All @@ -17,7 +21,18 @@ security processes to be applied to the binary files before committing them to a

== Adding the plugin

[source,groovy]
.build.gradle
[source,groovy,subs="+attributes"]
----
plugins {
id 'org.ysb33r.ivypot' version '{revnumber}'
}
----

Or for special cases you might want to do

.build.gradle
[source,groovy,subs="+attributes"]
----
buildscript {
repositories {
Expand All @@ -26,16 +41,14 @@ buildscript {
}
}
dependencies {
classpath 'org.ysb33r.gradle:ivypot:0.3.2'
classpath 'org.ysb33r.gradle:ivypot:{revnumber}'
}
}
apply plugin : 'org.ysb33r.ivypot'
----

or if you use Gradle 2.1+

If you are in a restricted environment, you might want to use approach number #1 and conditionally add the remote reference
If you are in a restricted environment, you might want to use the second approach and conditionally add the remote reference
to work only when you are in a non-restricted environment. i.e.

[source,groovy]
Expand All @@ -49,12 +62,7 @@ to work only when you are in a non-restricted environment. i.e.
}
----

[source,groovy]
----
plugins {
id 'org.ysb33r.ivypot' version '0.4'
}
----
You might also consider using link:https://docs.gradle.org/current/userguide/plugins.html#customPluginRepositories[pluginManagement] in `settings.gradle` for this case.

== Defining Remote Repositories

Expand Down
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ build:
verbosity: detailed

build_script:
- gradlew.bat -PTRAVIS_CI=1 assemble --info --no-daemon -PbintrayUserName -PbintrayApiKey
- gradlew.bat assemble --info --no-daemon

test_script:
- gradlew.bat check gradleTest -PTRAVIS_CI=1 --info --no-daemon -PbintrayUserName -PbintrayApiKey
- gradlew.bat build --info --no-daemon

branches:
only:
Expand All @@ -17,9 +17,7 @@ branches:

environment:
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0

matrix:
Expand Down
89 changes: 43 additions & 46 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,56 @@

// PLEASE NOTE: Integration Tests and Gradle Compatibility tests download a number of files.

buildscript {
repositories {
jcenter()
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
classpath 'org.ysb33r.gradle:gradletest:0.5.5'
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1'
}
}

apply plugin : 'groovy'
apply plugin : 'maven'
apply plugin : 'com.gradle.plugin-publish'
apply plugin : 'com.github.hierynomus.license'
apply plugin : 'org.ysb33r.gradletest'
plugins {
id 'groovy'
id 'maven'
id 'com.gradle.plugin-publish' version '0.9.7'
id 'com.github.hierynomus.license' version '0.12.1'
id 'org.ysb33r.gradletest' version '1.0'
}

apply from: 'gradle/integration-tests.gradle'

version = '0.4'
version = '0.5'
group = 'org.ysb33r.gradle'
sourceCompatibility = 1.6
targetCompatibility = 1.6

ext {
groovyLongVer = GroovySystem.version
groovyShortVer = GroovySystem.version.replaceAll(/\.\d+$/,'')

plugins.withType(JavaPlugin) {

project.tasks.withType(JavaCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
ivyJar = fileTree("${gradle.gradleHomeDir}/lib/plugins") {
include 'ivy*.jar'
}
}

project.tasks.withType(GroovyCompile) { task ->
task.sourceCompatibility = project.sourceCompatibility
task.targetCompatibility = project.targetCompatibility
task foo {
doLast {
println ivyJar.files
}
}

repositories {
jcenter()
}

dependencies {
compile 'org.ysb33r.gradle:grolifant:0.3'
compile gradleApi()
compile localGroovy()

testCompile 'org.spockframework:spock-core:1.0-groovy-2.3', {
testCompile "org.spockframework:spock-core:1.1-groovy-${groovyShortVer}", {
exclude module : 'groovy-all'
}
testCompile( 'com.athaydes:spock-reports:1.2.10' ) {
transitive = false // this avoids affecting your version of Groovy/Spock
}
testCompile 'org.slf4j:slf4j-api:1.7.13'
testCompile 'org.slf4j:slf4j-simple:1.7.13'

testRuntime ivyJar
}

test {
systemProperties DONT_LOOK_FOR_IVY_JAR : 1
}

integrationTest {
Expand All @@ -89,8 +81,8 @@ license {
mapping {
groovy ='DOUBLESLASH_STYLE'
}
ext.year = '2013-2015'
excludes(['**/*.ad', '**/*.asciidoc', '**/*.adoc', '**/*.md','**/*.properties'])
ext.year = '2013-2017'
excludes(['**/*.ad', '**/*.asciidoc', '**/*.adoc', '**/*.md','**/*.properties','**/*CompatibilitySpec.groovy'])
}

pluginBundle {
Expand All @@ -115,22 +107,27 @@ pluginBundle {
}

publishPlugins {
group 'release'
onlyIf { !version.endsWith("SNAPSHOT") }
}

gradleLocations {
downloadToGradleUserHome = true
mustRunAfter build
}

gradleTest {
versions '2.0'
versions '2.2'
versions '2.3'
versions '2.4'
versions '2.8'
versions '2.10'
versions '2.12', '2.13-rc-1'
versions '2.8', '2.10'
versions '2.12', '2.14.1'
versions '3.0', '3.1', '3.5'
versions '4.0', '4.1', '4.2'

inputs.files jar
inputs.dir file('gradleTest')

beforeTest {
println " ${it.name}"
}
}

task release {
group 'release'
description 'Life-cycle task for relasing the plugin'
dependsOn build, publishPlugins
}
12 changes: 8 additions & 4 deletions gradle/integration-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ configurations {

sourceSets {
integrationTest {
java.srcDir file("src/integTest/java")
groovy.srcDir file("src/integTest/groovy")
resources.srcDir file("src/integTest/resources")
java.srcDir file('src/integTest/java')
groovy.srcDir file('src/integTest/groovy')
resources.srcDir file('src/integTest/resources')
compileClasspath = sourceSets.main.output + configurations.integrationTestCompile
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
}
}

task integrationTest(type: Test, dependsOn: jar) {
testClassesDir = sourceSets.integrationTest.output.classesDir
if(GradleVersion.current() < GradleVersion.version('4.0')) {
testClassesDir = sourceSets.integrationTest.output.classesDir
} else {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
}
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 22 14:13:52 BST 2015
#Fri Sep 29 21:31:19 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
10 changes: 3 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ case "`uname`" in
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
Expand All @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Expand Down Expand Up @@ -114,6 +109,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down
6 changes: 0 additions & 6 deletions src/gradleTest/basicTest/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
buildscript {
dependencies {
classpath 'org.ysb33r.gradle:ivypot:%%VERSION%%'
}
}

apply plugin : 'org.ysb33r.ivypot'

configurations {
Expand Down
Loading

0 comments on commit 9b493d2

Please sign in to comment.