Skip to content

Commit

Permalink
Use generated unchecked exception wrapper version of utils class
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashinsch committed Mar 29, 2015
1 parent a07dd87 commit 5ef16f5
Show file tree
Hide file tree
Showing 5 changed files with 3,319 additions and 14 deletions.
36 changes: 35 additions & 1 deletion lib/lib.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1")
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
classpath 'eu.hinsch:checked-exception-wrapper-gradle-plugin:0.1.1'
}
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'eu.hinsch.checked-exception-wrapper'

ext {
springBootVersion = '1.2.1.RELEASE'
Expand Down Expand Up @@ -39,8 +42,24 @@ dependencies {
compile("com.codepoetics:protonpack:1.4")

testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")

checkedExceptionWrapperGenerator("commons-io:commons-io:2.4:sources")
checkedExceptionWrapperGenerator("org.apache.commons:commons-compress:1.9:sources")
}

sourceSets {
main {
java {
srcDir 'src/generated/java'
}
}
}

javadoc {
failOnError = false
// TODO not working
// exclude '**/generated/**'
}

idea {
module {
Expand All @@ -57,12 +76,27 @@ jacocoTestReport {
}

test {
jacoco {
excludes = ['org.apache.*', '*Unchecked*']
}
testLogging {
events "failed"
exceptionFormat "full" // show assertion errors in build
}
}

checkedExceptionWrapperGenerator {
classes = ['org/apache/commons/io/IOUtils',
// 'org/apache/commons/io/FileUtils',
// 'org/apache/commons/compress/utils/IOUtils',
'org/apache/commons/io/input/ReversedLinesFileReader']
outputFolder = 'src/generated/java'
generatedClassNameSuffix = ''
generatedClassNamePrefix = 'Unchecked'
runtimeExceptionClass = 'java.lang.RuntimeException'
exceptionMessage = ''
}

// sign and publish to MC is done only locally so far

if (System.getenv('CI') != 'true') {
Expand Down
Loading

0 comments on commit 5ef16f5

Please sign in to comment.