build.gradle 2.04 KB
/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java Library project to get you started.
 * For more details take a look at the Java Libraries chapter in the Gradle
 * user guide available at https://docs.gradle.org/4.5.1/userguide/java_library_plugin.html
 */
plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'java'
    id 'eclipse'
	id 'application'
	id 'maven'
}

jar.enabled = true
group = 'com.taover.repository'
mainClassName = 'com.taover.repository.UtilsString'

dependencies {
	compile("org.springframework.boot:spring-boot-starter:2.0.5.RELEASE")
	compile("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final")
    compile('org.springframework:spring-jdbc:5.1.9.RELEASE')
    compile('mysql:mysql-connector-java:5.1.47')
    compile('com.alibaba:druid:1.2.4')
    compile("org.apache.shardingsphere:shardingsphere-sharding-spring-boot-starter:5.0.0-alpha")
}

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.1.52'
                artifactId ARTIFACT_Id
                groupId GROUP_ID
                packaging TYPE
                description DESCRIPTION
            }
        }
    }
}