Permalink
Browse files

Add distribution and shadow plugin. Finish with publishing to bintray.

  • Loading branch information...
thekingnothing committed Jan 22, 2017
1 parent b5c9d7e commit e7a20f6507ee28675567893384ceaba64d61245c
Showing with 701 additions and 1,721 deletions.
  1. +1 −1 LICENSE.txt
  2. +8 −351 build.gradle
  3. +9 −2 gradle/java-module.gradle
  4. +372 −0 gradle/modules.gradle
  5. 0 gradle/{ → publishing}/publish-maven.gradle
  6. +14 −4 gradle/{ → publishing}/publish.gradle
  7. +0 −8 gradle/{ → publishing}/publishable-module.gradle
  8. +33 −0 gradle/release/distZip.gradle
  9. +53 −0 gradle/release/fullJars.gradle
  10. +14 −0 gradle/release/publish-distZip.gradle
  11. +8 −0 gradle/release/publish-fullJar.gradle
  12. +8 −0 gradle/release/publish-jar.gradle
  13. 0 gradle/{ → release}/release.gradle
  14. +165 −0 powermock-release/build.gradle
  15. 0 {release → powermock-release}/pom.xmlold
  16. +0 −162 release/easymock-extension-api-full/pom.xmlold
  17. +0 −15 release/easymock-extension-api-full/src/assembly/full.xml
  18. +0 −71 release/junit-without-mock-framework/pom.xmlold
  19. +0 −15 release/junit-without-mock-framework/src/assembly/full.xml
  20. +0 −173 release/mockito-extension-api-full/pom.xmlold
  21. +0 −15 release/mockito-extension-api-full/src/assembly/full.xml
  22. +0 −191 release/mockito2-extension-api-full/pom.xmlold
  23. +0 −33 release/mockito2-extension-api-full/src/assembly/full.xml
  24. +0 −61 release/testng-without-mock-framework/pom.xmlold
  25. +0 −15 release/testng-without-mock-framework/src/assembly/full.xml
  26. +0 −66 release/with-junit-easymock-dependencies/pom.xmlold
  27. +0 −12 release/with-junit-easymock-dependencies/src/assembly/final.xml
  28. +0 −62 release/with-junit-mockito-dependencies/pom.xmlold
  29. +0 −12 release/with-junit-mockito-dependencies/src/assembly/final.xml
  30. +0 −80 release/with-junit-mockito2-dependencies/pom.xmlold
  31. +0 −30 release/with-junit-mockito2-dependencies/src/assembly/final.xml
  32. +0 −65 release/with-testng-easymock-dependencies/pom.xmlold
  33. +0 −12 release/with-testng-easymock-dependencies/src/assembly/final.xml
  34. +0 −62 release/with-testng-mockito-dependencies/pom.xmlold
  35. +0 −12 release/with-testng-mockito-dependencies/src/assembly/final.xml
  36. +0 −80 release/with-testng-mockito2-dependencies/pom.xmlold
  37. +0 −30 release/with-testng-mockito2-dependencies/src/assembly/final.xml
  38. +0 −65 release/without-test-and-mock-framework/pom.xmlold
  39. +0 −15 release/without-test-and-mock-framework/src/assembly/full.xml
  40. +7 −1 settings.gradle
  41. +9 −0 tests/build.gradle
View
@@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2007 PowerMock Contributors
Copyright 2007-2017 PowerMock Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
@@ -13,6 +13,7 @@ buildscript {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'net.researchgate:gradle-release:2.4.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
@@ -37,7 +38,6 @@ ext{
eclipseJdt = "3.3.0-v_771"
}
apply from: "${gradleScriptDir}/version.gradle"
description = 'PowerMock allows you to unit test code normally regarded as untestable.\n' +
' For instance it is possible to mock static methods, remove static initializers, allow mocking without dependency\n' +
@@ -47,362 +47,19 @@ description = 'PowerMock allows you to unit test code normally regarded as untes
' PowerMock can be used to test otherwise untestable code and also to achieve a cleaner separation between test\n' +
' and production code.'
def publishableModules = allprojects - project(":powermock-api") - project(":powermock-classloading") - project(":powermock-modules") - project(":tests") - project(":tests").subprojects
configure(publishableModules) { project ->
apply from: "${gradleScriptDir}/publishable-module.gradle"
}
def mockitoDependsModules = [
project(":powermock-core"),
project(":powermock-api:powermock-api-mockito-common"),
project(":powermock-api:powermock-api-mockito"),
project(":powermock-api:powermock-api-mockito2"),
]
configure(mockitoDependsModules) { project ->
apply from: "${gradleScriptDir}/mockito-module.gradle"
}
project("powermock-reflect") {
description = "Various utilities for accessing internals of a class."
dependencies {
compile("org.objenesis:objenesis:${objenesisVersion}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
testCompile("cglib:cglib-nodep:${cglibVersion}")
}
}
project("powermock-core") {
description = "Various utilities for accessing internals of a class."
dependencies {
compile(project(":powermock-reflect"))
compile("org.javassist:javassist:${javassistVersion}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
testCompile("org.mockito:mockito-core:${mockito1Version}")
mockito2("org.mockito:mockito-core:${mockito2Version}")
}
check.dependsOn mockito2Test
}
project("powermock-api:powermock-api-support"){
description = "PowerMock API Utility classes."
dependencies {
compile(project(":powermock-reflect"))
compile(project(":powermock-core"))
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project("powermock-api:powermock-api-easymock"){
description = "PowerMock API for EasyMock."
dependencies {
compile(project(":powermock-api:powermock-api-support"))
compile("cglib:cglib-nodep:${cglibVersion}")
provided("org.easymock:easymock:${easymockVersion}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project("powermock-api:powermock-api-mockito-common"){
description = "PowerMock API for Mockito. Common classes."
dependencies {
compile(project(":powermock-api:powermock-api-support"))
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
provided("org.mockito:mockito-core:${mockito1Version}")
mockito2(project(":powermock-api:powermock-api-support"))
mockito2("org.mockito:mockito-core:${mockito2Version}")
}
}
project("powermock-api:powermock-api-mockito"){
description = "PowerMock API for Mockito 1.+.."
sourceSets {
main {
compileClasspath = compileClasspath + configurations.provided;
runtimeClasspath = output + compileClasspath + configurations.provided
}
test {
compileClasspath = compileClasspath + configurations.provided + configurations.provided
runtimeClasspath = output + compileClasspath + configurations.provided
}
}
dependencies {
compile(project(":powermock-api:powermock-api-mockito-common"))
compile("org.mockito:mockito-core:${mockito1Version}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project("powermock-api:powermock-api-mockito2"){
description = "PowerMock API for Mockito 2.+.."
sourceSets {
main {
compileClasspath = compileClasspath + configurations.provided
runtimeClasspath = output + compileClasspath + configurations.provided
}
test {
compileClasspath = compileClasspath + configurations.provided + configurations.provided
runtimeClasspath = output + compileClasspath + configurations.provided
}
}
dependencies {
compile(project(":powermock-api:powermock-api-mockito-common"))
compile("org.mockito:mockito-core:${mockito2Version}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-classloading:powermock-classloading-base"){
description = "Utilities for loading and executing classes."
dependencies {
compile(project(":powermock-api:powermock-api-support"))
compile(project(":powermock-reflect"))
compile(project(":powermock-core"))
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-classloading:powermock-classloading-objenesis"){
description = "Performs classloader deep-cloning using Objenesis."
dependencies {
compile(project(":powermock-classloading:powermock-classloading-base"))
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-classloading:powermock-classloading-xstream"){
description = "Performs classloader deep-cloning using X-Stream."
dependencies {
compile(project(":powermock-classloading:powermock-classloading-base"))
compile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-javaagent"){
description = "PowerMock Java agent support."
dependencies {
compile(project(":powermock-core"))
testCompile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
jar {
manifest {
attributes(
"Manifest-Version": "1.0",
"Premain-Class": "org.powermock.modules.agent.PowerMockAgent",
"Agent-Class": "org.powermock.modules.agent.PowerMockAgent",
"Can-Retransform-Classes": true,
"Can-Redefine-Classes": true
)
}
}
}
project(":powermock-modules:powermock-module-junit3"){
description = "PowerMock support module for JUnit 3.x."
dependencies {
compile(project(":powermock-core")){
exclude group:'junit', module:'junit'
}
compile("junit:junit:3.8.2"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-junit4-common"){
description = "PowerMock support module for all versions of JUnit 4.x."
dependencies {
compile(project(":powermock-reflect"))
compile(project(":powermock-core"))
compile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
compile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-junit4"){
description = "PowerMock support module for JUnit 4.x."
dependencies {
compile(project(":powermock-modules:powermock-module-junit4-common"))
compile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
compile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
testCompile("org.easymock:easymock:${easymockVersion}")
}
}
project(":powermock-modules:powermock-module-junit4-legacy"){
description = "PowerMock support module for JUnit 4.0-4.3."
dependencies {
compile(project(":powermock-modules:powermock-module-junit4-common")){
exclude group:'junit', module:'junit'
}
compile("junit:junit:4.3"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
compile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-junit4-rule"){
description = "PowerMock support module for JUnit 4.x rules."
dependencies {
compile(project(":powermock-core"))
compile(project(":powermock-modules:powermock-module-junit4-common"))
provided(project(":powermock-classloading:powermock-classloading-base"))
compile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
compile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-junit4-rule-agent"){
description = "PowerMock support module for JUnit 4.x rules with Java agent"
dependencies {
compile(project(":powermock-core"))
compile(project(":powermock-modules:powermock-module-javaagent"))
compile("junit:junit:${junitVersion}"){
exclude group:'org.hamcrest', module:'hamcrest-core'
}
compile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-testng-common"){
description = "PowerMock module for TestNG. Common classes"
dependencies {
compile(project(":powermock-reflect"))
compile(project(":powermock-core"))
compile("org.testng:testng:${testngVersion}")
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
project(":powermock-modules:powermock-module-testng"){
description = "PowerMock module for TestNG."
apply from: "${gradleScriptDir}/version.gradle"
dependencies {
compile(project(":powermock-core"))
compile(project(":powermock-modules:powermock-module-testng-common"))
compile("org.testng:testng:${testngVersion}")
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
allprojects{
apply plugin: 'propdeps-idea'
}
project(":powermock-modules:powermock-module-testng-agent"){
description = "PowerMock module for TestNG with using Javaagent."
apply from: "${gradleScriptDir}/modules.gradle"
apply from: "${gradleScriptDir}/release/release.gradle"
dependencies {
compile(project(":powermock-core"))
compile(project(":powermock-modules:powermock-module-testng-common"))
compile(project(":powermock-modules:powermock-module-javaagent"))
compile("org.testng:testng:${testngVersion}")
testCompile("org.hamcrest:hamcrest-core:${hamcrestVersion}")
testCompile("org.assertj:assertj-core:${assertjVersion}")
}
}
configure(publishableModules) { project ->
apply from: "${gradleScriptDir}/publish-maven.gradle"
apply from: "${gradleScriptDir}/publish.gradle"
jar{
enabled = false
}
apply from: "${gradleScriptDir}/release.gradle"
task wrapper(type: Wrapper) {
gradleVersion = '3.2.1'
}
Oops, something went wrong.

0 comments on commit e7a20f6

Please sign in to comment.