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

Commit

Permalink
Make plugin compatible for 5.2.1
Browse files Browse the repository at this point in the history
Rewrote most of repository management to be less dependant on Gradle
APIs. The only remaining internal APIs are related to  RepositoryLayout.

Minimum supported Gradle versions is 5.0.
  • Loading branch information
ysb33r committed Feb 21, 2019
1 parent e11f664 commit 6c6a21e
Show file tree
Hide file tree
Showing 24 changed files with 276 additions and 258 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
= CHANGELOG
:issue: link:https://github.com/ysb33r/ivypot-gradle-plugin/issues/

== 1.0

=== Compatibility

* Gradle compatibility tested 4.0 - 5.2.1

=== Breaking changes

* Minimum JDK8 required
* Major rewrite of the internal reposiotry support. Relies less on Gradle less APIs and provides a DSL layer that mimics the Gradle `repository` structure, but is not binary compatible.

== 0.8

* {issue}32[#32] - Honour non-transitive dependencies
Expand Down
6 changes: 4 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= IvyPot - A Gradle plugin for Off-line Repositories
:revnumber: 0.8
:revnumber:0.9

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
Expand All @@ -9,12 +9,14 @@ security processes to be applied to the binary files before committing them to a

== Gradle minimum versions

* As from 0.7 the minimum supported Gradle version is 4.0. (Re uired if you want Google repository support).
* As from 0.9 the minimum supported Gradle version is 5.0.
* As from 0.7 the minimum supported Gradle version is 4.0. (Required if you want Google repository support).
* As from 0.5 the minimum supported Gradle version in 2.8.


== Previous versions

* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_8_0[Release 0.8]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_7_0[Release 0.7]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_6_0[Release 0.6]
* https://github.com/ysb33r/ivypot-gradle-plugin/tree/RELEASE_0_5_0[Release 0.5]
Expand Down
17 changes: 8 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@


// PLEASE NOTE: Integration Tests and Gradle Compatibility tests download a number of files.
import org.gradle.util.GradleVersion

plugins {
id 'groovy'
id 'maven'
id 'com.gradle.plugin-publish' version '0.9.9'
id 'com.github.hierynomus.license' version '0.12.1'
id 'org.ysb33r.gradletest' version '2.0-alpha-6'
id 'org.ysb33r.gradletest' version '2.0-beta.3'
id 'org.ysb33r.os' version '0.9'
}

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

version = '0.9-SNAPSHOT'
group = 'org.ysb33r.gradle'
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

ext {
groovyLongVer = GroovySystem.version
Expand All @@ -50,11 +51,11 @@ repositories {
}

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

testCompile "org.spockframework:spock-core:1.1-groovy-${groovyShortVer}", {
testCompile "org.spockframework:spock-core:1.2-groovy-${groovyShortVer}", {
exclude module : 'groovy-all'
}
testCompile 'org.slf4j:slf4j-api:1.7.13'
Expand Down Expand Up @@ -114,12 +115,10 @@ publishPlugins {
}

gradleTest {
versions '4.0.2', '4.1', '4.2.1'
versions '4.3.1', '4.4.1', '4.5'
versions '4.6', '4.7'
versions '5.2.1'
versions '5.0'

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

beforeTest {
println " ${it.name}"
Expand Down
1 change: 1 addition & 0 deletions gradle/integration-tests.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This is based upon what Rob Fletcher has done at
// https://raw.githubusercontent.com/robfletcher/gradle-compass/master/gradle/integration-tests.gradle
import org.gradle.util.GradleVersion

configurations {
integrationTestCompile {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Apr 25 17:54:04 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-all.zip
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
static final File LOCALREPO = new File(ROOT, 'local-offline-repo')

Project project
Task syncTask

void setupSpec() {
OfflineRepositorySync.DONT_LOOK_FOR_IVY_JAR = true
Expand Down Expand Up @@ -92,7 +91,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
LOCALREPO.exists()
Expand Down Expand Up @@ -128,7 +127,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
LOCALREPO.exists()
Expand Down Expand Up @@ -165,7 +164,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
LOCALREPO.exists()
Expand Down Expand Up @@ -201,7 +200,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
new File(LOCALREPO, 'commons-io/commons-io/2.4/ivy-2.4.xml').exists()
Expand Down Expand Up @@ -280,7 +279,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
LOCALREPO.exists()
Expand Down Expand Up @@ -316,7 +315,7 @@ class OfflineRepositorySyncIntegrationSpec extends Specification {
}

project.evaluate()
project.tasks.syncRemoteRepositories.execute()
project.tasks.syncRemoteRepositories.exec()

expect:
LOCALREPO.exists()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class OfflineRepositoryPlugin implements Plugin<Project> {

void apply(Project project) {

if(GradleVersion.current() < GradleVersion.version(MINIMUM_GRADLE)) {
if (GradleVersion.current() < GradleVersion.version(MINIMUM_GRADLE)) {
throw new GradleException("Ivypot can only be used with Gradle ${MINIMUM_GRADLE} or later")
}
project.tasks.create 'syncRemoteRepositories', OfflineRepositorySync
Expand Down
Loading

0 comments on commit 6c6a21e

Please sign in to comment.