• 添加lib,支持断点运行,支持自动打包,支持 中文。


    project 

     build.gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {

    repositories {
    jcenter()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:2.2.2'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
    }

    allprojects {
    repositories {
    jcenter()
    }
    }

    task clean(type: Delete) {
    delete rootProject.buildDir
    }


    app
    build.gradle

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
    applicationId "com.yunfeisky.sha1"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    }


    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    testCompile 'junit:junit:4.12'


    }

    lib
    build.gradle

    apply plugin: 'java'


    tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
    dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/mysql-connector-java-5.1.46.jar')
    }


    jar {
    manifest {
    attributes 'Main-Class': 'com.yunfeisky.lib.myClass'
    attributes 'Class-Path':'libs/mysql-connector-java-5.1.46.jar'
    }
    }

    sourceCompatibility = "1.7"
    targetCompatibility = "1.7"

    gradle-wrapper.properties

    #Thu Jul 12 17:53:45 CST 2018
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip
  • 相关阅读:
    c#剪切板操作
    eclipse mvn build error tips
    Redis Tips
    IntilliJ Idea 使用中的问题与解决方案
    mongo
    python
    SQL Relative
    sybase update
    run current vim file
    git
  • 原文地址:https://www.cnblogs.com/hui413027075/p/9303116.html
Copyright © 2020-2023  润新知