build.gradle 1.67 KB

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'maven'

jar.enabled = true
group = 'com.taover.easyexcel'
mainClassName = 'com.taover.easyexcel.EasyExcel'

dependencies {
	compile(
		"org.apache.poi:poi:3.17",
		"org.apache.poi:poi-ooxml:3.17",
		"org.apache.poi:poi-ooxml-schemas:3.17",
        "cglib:cglib:3.1",
        "org.slf4j:slf4j-api:1.7.26",
        "org.ehcache:ehcache:3.4.0",
        "ch.qos.logback:logback-classic:1.2.3",
        "com.alibaba:fastjson:1.2.71",
        "org.projectlombok:lombok:1.18.8",
        "junit:junit:4.12"
	)
}

repositories {
    jcenter()
	maven{ url 'http://repository.sonatype.org/content/groups/public/' }
	maven{ url 'https://repository.jboss.org/nexus/content/groups/public/' }
	maven{ url 'http://nexus.taover.com:9001/repository/maven-releases/' }
}

task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = 'sources'
    from sourceSets.main.allSource
}

tasks.withType(JavaCompile) {  
    options.encoding = "UTF-8"  
}

artifacts {
    archives sourcesJar
}

uploadArchives {
    configuration = configurations.archives
    repositories {
        mavenDeployer {
            snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
                authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
            }
            repository(url: MAVEN_REPO_RELEASE_URL) {
                authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
            }
            pom.project {
                version '2.2.26'
                artifactId ARTIFACT_Id
                groupId GROUP_ID
                packaging TYPE
                description DESCRIPTION
            }
        }
    }
}