Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPI-off jar support #80

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Test Data Supplier Changelog

## 1.8.4
**Added SPI-off jar support to allow users manually handling DataProviderTransformer via spi-off classifier.**

[083395fd52326c9](https://github.com/sskorol/test-data-supplier/commit/083395fd52326c9) Sergey Korol *2019-04-15 at 21:23*

## 1.8.3
**Updated dependencies which potentially caused issues on latest Java 11.**

[633b652a11c342b](https://github.com/sskorol/test-data-supplier/commit/633b652a11c342b) Sergey Korol *2019-02-17 at 18:26*

## 1.8.2
**Added Java 11 support.
AspectJ is still in RC state, so may produce illegal access warnings.**
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ configurations {
}

dependencies {
agent 'org.aspectj:aspectjweaver:1.9.2.RC'
compile 'io.github.sskorol:test-data-supplier:1.8.2'
agent 'org.aspectj:aspectjweaver:1.9.2'
compile 'io.github.sskorol:test-data-supplier:1.8.4'
testCompile 'org.testng:testng:6.14.3'
}

Expand Down Expand Up @@ -204,9 +204,6 @@ test {
}
```

Note that **AspectJ** is still in RC state in terms of Java 11 support. A patch version will be created as soon as AspectJ is officially released.
For now you may see some warnings related to illegal assess in console log.

Your **module-info.java** may look like the following:

```java
Expand Down Expand Up @@ -454,6 +451,14 @@ public class IAnnotationTransformerInterceptorImpl implements IAnnotationTransfo

It's just an SPI wrapper for common TestNG mechanism. Use the same technique as for **DataSupplierInterceptor** to include it into your project.

Note that in case if you want to manage **DataProviderTransformer** manually, you have to use a special spi-off distribution:

```groovy
dependencies {
compile 'io.github.sskorol:test-data-supplier:1.8.4:spi-off'
}
```

## IntelliJ IDEA support

**Test Data Supplier** is integrated with IntelliJ IDEA in a form of plugin. Just install **test-data-supplier-plugin** from the official JetBrains repository.
Expand Down
24 changes: 20 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,28 @@ task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}

task sourceJar(type: Jar, dependsOn: classes) {
jar {
inputs.property("moduleName", moduleName)
manifest {
attributes('Automatic-Module-Name': moduleName)
}
classifier = 'sources'
from sourceSets.main.allJava
from sourceSets.main.output
from("src/main/services") {
into("META-INF/services")
}
}

task spiOffJar(type: Jar, dependsOn: classes) {
inputs.property("moduleName", moduleName)
manifest {
attributes('Automatic-Module-Name': moduleName)
}
classifier = 'spi-off'
from sourceSets.main.output
}

configurations {
spiOff.extendsFrom(compile)
}

tasks.withType(Javadoc) {
Expand All @@ -88,7 +103,8 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
}

artifacts {
archives sourceJar
spiOff spiOffJar
archives spiOffJar
archives javadocJar
}

Expand Down