Browse Source

migrate to kts:prepare step2 disambiguating function invocations and property assignment

dev-kts
andywu91 3 years ago
parent
commit
7b5a3a31dc
  1. 38
      app/build.gradle
  2. 10
      build.gradle
  3. 38
      lib/build.gradle
  4. 2
      settings.gradle

38
app/build.gradle

@ -1,39 +1,39 @@
plugins{ plugins {
id "com.android.application" id("com.android.application")
id "kotlin-android" id("kotlin-android")
} }
android { android {
compileSdkVersion 28 compileSdkVersion = 28
defaultConfig { defaultConfig {
applicationId "com.wuliang.xapkinstaller" applicationId = "com.wuliang.xapkinstaller"
minSdkVersion 14 minSdkVersion = 14
targetSdkVersion 28 targetSdkVersion = 28
versionCode 1 versionCode = 1
versionName "1.0" versionName = "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled = false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
} }
} }
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }
buildToolsVersion = "28.0.3" buildToolsVersion = "28.0.3"
} }
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation(fileTree(dir: "libs", include: ["*.jar"]))
implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat_version" implementation("androidx.appcompat:appcompat:$rootProject.ext.appcompat_version")
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
testImplementation "junit:junit:4.12" testImplementation("junit:junit:4.12")
implementation project(path: ":lib") implementation(project(path: ":lib"))
implementation "com.liulishuo.okdownload:okdownload:1.0.7" implementation("com.liulishuo.okdownload:okdownload:1.0.7")
} }

10
build.gradle

@ -11,8 +11,8 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:3.6.0" classpath("com.android.tools.build:gradle:3.6.0")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
@ -25,6 +25,6 @@ allprojects {
} }
} }
task clean(type: Delete) { task(clean(type: Delete) {
delete rootProject.buildDir delete = rootProject.buildDir
} })

38
lib/build.gradle

@ -1,48 +1,48 @@
plugins{ plugins{
id "com.android.library" id("com.android.library")
id "kotlin-android" id("kotlin-android")
id "maven-publish" id("maven-publish")
} }
group = "com.wuliang.lib" group = "com.wuliang.lib"
version = "1.0.0" version = "1.0.0"
android { android {
compileSdkVersion 28 compileSdkVersion = 28
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion = 14
targetSdkVersion 28 targetSdkVersion = 28
versionCode 1 versionCode = 1
versionName "1.0" versionName = "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro" consumerProguardFiles("consumer-rules.pro")
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled = false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
} }
} }
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }
buildToolsVersion = "28.0.3" buildToolsVersion = "28.0.3"
} }
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation (fileTree(dir: "libs", include: ["*.jar"]))
implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat_version" implementation( "androidx.appcompat:appcompat:$rootProject.ext.appcompat_version")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
testImplementation "junit:junit:4.12" testImplementation( "junit:junit:4.12")
implementation "org.zeroturnaround:zt-zip:1.13" implementation("org.zeroturnaround:zt-zip:1.13")
} }
// Because the components are created only during the afterEvaluate phase, you must // Because the components are created only during the afterEvaluate phase, you must
@ -53,7 +53,7 @@ afterEvaluate {
// Creates a Maven publication called "release". // Creates a Maven publication called "release".
release(MavenPublication) { release(MavenPublication) {
// Applies the component for the release build variant. // Applies the component for the release build variant.
from components.release from(components.release)
// You can then customize attributes of the publication as shown below. // You can then customize attributes of the publication as shown below.
artifactId = "xapkinstaller" artifactId = "xapkinstaller"

2
settings.gradle

@ -1,2 +1,2 @@
include ":app", ":lib" include(":app", ":lib")
rootProject.name="XAPK Installer" rootProject.name="XAPK Installer"

Loading…
Cancel
Save