Skip to content

Commit

Permalink
Merge branch 'develop' into develop-kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyge committed Jan 23, 2019
2 parents 6d4ee62 + 93ea311 commit af97421
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 192 deletions.
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

buildscript {
repositories {
jcenter()
google()
maven { setUrl("https://dl.google.com/dl/android/maven2/") }
maven { setUrl("https://mirrors.huaweicloud.com/repository/maven/") } // Huawei Maven mirrors
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:${property("ANDROID_BUILD_VERSION")}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${property("KOTLIN_VERSION")}")
// classpath("guru.stefma.bintrayrelease:bintrayrelease:${property("BINTRAY_RELEASE_VERSION")}")
classpath("com.novoda:bintray-release:0.9")
}
}

allprojects {
repositories {
jcenter()
google()
maven { setUrl("https://dl.google.com/dl/android/maven2/") }
maven { setUrl("https://mirrors.huaweicloud.com/repository/maven/") } // Huawei Maven mirrors
maven { setUrl("https://dl.bintray.com/panpf/maven") }
jcenter()
}
}

tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
11 changes: 0 additions & 11 deletions build_kotlin.gradle

This file was deleted.

11 changes: 11 additions & 0 deletions build_kotlin.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply { from("kotlin-android")}
apply { from("kotlin-android-extensions")}

//androidExtensions {
// experimental = true
//}

dependencies{
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${property("KOTLIN_VERSION")}")
implementation("androidx.core:core-ktx:${property("ANDROIDX_CORE_KTX")}")
}
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.debug.obsoleteApi=true

# build
KOTLIN_VERSION=1.3.11
ANDROID_BUILD_VERSION=3.3.0
Expand Down Expand Up @@ -53,4 +51,4 @@ EVENT_BUS_VERSION=3.0.0
RETROFIT_VERSION=2.3.0
LEAK_CANARY_ANDROID_VERSION=1.6.2
FLEXBOX=0.3.2
PANPF_ANDROIDX=1.0.0-alpha2
PANPF_ANDROIDX=1.0.0-alpha3
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Oct 19 11:18:57 CST 2018
#Wed Jan 16 18:00:16 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
80 changes: 0 additions & 80 deletions sample-video-thumbnail/build.gradle

This file was deleted.

77 changes: 77 additions & 0 deletions sample-video-thumbnail/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import com.android.build.gradle.BaseExtension
import org.jetbrains.kotlin.kapt3.base.Kapt.kapt
import java.util.Properties

plugins {
id("com.android.application")
kotlin("android")
kotlin("android.extensions")
}
//apply { from("../build_kotlin.gradle") }

val localProperties = Properties().apply { project.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) } }.takeIf { !it.isEmpty }
val jksFile = localProperties?.getProperty("sample.storeFile")?.let { file(it) } ?: null

configure<BaseExtension> {
compileSdkVersion(property("COMPILE_SDK_VERSION").toString().toInt())

defaultConfig {
applicationId = "me.panpf.sketch.sample.videothumbnail"

minSdkVersion(property("MIN_SDK_VERSION").toString().toInt())
targetSdkVersion(property("TARGET_SDK_VERSION").toString().toInt())
versionCode = property("VERSION_CODE").toString().toInt()
versionName = property("VERSION_NAME").toString()

ndk {
abiFilters("armeabi", "x86")
}
}

signingConfigs {
create("release"){
storeFile = jksFile
storePassword = localProperties?.getProperty ("sample.storePassword")
keyAlias = localProperties?.getProperty ("sample.keyAlias")
keyPassword = localProperties?.getProperty ("sample.keyPassword")
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile ("proguard-android.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("release")
}
}
}

dependencies {
implementation(project(":sketch"))

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${property("KOTLIN_VERSION")}")
implementation("androidx.core:core-ktx:${property("ANDROIDX_CORE_KTX")}")

implementation("androidx.appcompat:appcompat:${property("ANDROIDX_APPCOMPAT")}")
implementation("androidx.recyclerview:recyclerview:${property("ANDROIDX_RECYCLERVIEW")}")
implementation("androidx.constraintlayout:constraintlayout:${property("ANDROIDX_CONSTRAINTLAYOUT")}")

implementation("androidx.lifecycle:lifecycle-extensions:${property("ANDROIDX_LIFECYCLE")}")
implementation("androidx.lifecycle:lifecycle-viewmodel:${property("ANDROIDX_LIFECYCLE")}")
implementation("androidx.lifecycle:lifecycle-livedata:${property("ANDROIDX_LIFECYCLE")}")
kapt("androidx.lifecycle:lifecycle-compiler:${property("ANDROIDX_LIFECYCLE")}")
implementation("androidx.paging:paging-runtime:${property("ANDROIDX_PAGING")}")

implementation("me.panpf:assembly-adapter:${property("ASSEMBLY_ADAPTER_VERSION")}")
implementation("me.panpf:assembly-adapter-ktx:${property("ASSEMBLY_ADAPTER_VERSION")}")
implementation("me.panpf:assembly-paged-list-adapter:${property("ASSEMBLY_ADAPTER_VERSION")}")
implementation("me.panpf:androidx-kt:${property("PANPF_ANDROIDX")}")
implementation("me.panpf:androidx-kt-arch:${property("PANPF_ANDROIDX")}")

implementation("com.github.wseemann:FFmpegMediaMetadataRetriever:${property("FFMPEG_MEDIA_METADATA_RETRIEVER_VERSION")}")

debugImplementation("com.squareup.leakcanary:leakcanary-android:${property("LEAK_CANARY_ANDROID_VERSION")}")
debugImplementation("com.squareup.leakcanary:leakcanary-support-fragment:${property("LEAK_CANARY_ANDROID_VERSION")}")
releaseImplementation("com.squareup.leakcanary:leakcanary-android-no-op:${property("LEAK_CANARY_ANDROID_VERSION")}")
testImplementation("com.squareup.leakcanary:leakcanary-android-no-op:${property("LEAK_CANARY_ANDROID_VERSION")}")
}
5 changes: 0 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ android {
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

aaptOptions {
noCompress "bmp"
}
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include(
// ":sample",
":sketch"
// ":sketch-gif"
// , ":sample-video-thumbnail"
,":sketch-gif"
, ":sample-video-thumbnail"
)
20 changes: 1 addition & 19 deletions sketch-gif/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import com.android.build.gradle.BaseExtension
import com.novoda.gradle.release.PublishExtension
import java.util.Properties

plugins {
id("com.android.library")
// id("guru.stefma.bintrayrelease")
id("com.novoda.bintray-release")
}

Expand Down Expand Up @@ -31,24 +31,6 @@ dependencies {
implementation("androidx.annotation:annotation:${property("ANDROIDX_ANNOTATION")}")
}

//apply { from("build_upload.gradle.kts") }

//Properties().apply { project.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) } }.takeIf { !it.isEmpty }?.let { localProperties ->
// // apply { plugin("guru.stefma.bintrayrelease") }
//
//// version = android.defaultConfig.versionName
// version = property("VERSION_NAME").toString()
// group = "me.panpf"
// configure<PublishExtension> {
// artifactId = "sketch-gif"
// desc = "Android, Image, Load, GIF"
// website = "https://github.com/panpf/sketch"
// userOrg = localProperties.getProperty("bintray.userOrg")
// bintrayUser = localProperties.getProperty("bintray.user")
// bintrayKey = localProperties.getProperty("bintray.apikey")
// }
//}

Properties().apply { project.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) } }.takeIf { !it.isEmpty }?.let { localProperties ->
configure<PublishExtension> {
groupId = "me.panpf"
Expand Down
19 changes: 0 additions & 19 deletions sketch-gif/build_upload.gradle.kts

This file was deleted.

25 changes: 22 additions & 3 deletions sketch/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import com.android.build.gradle.BaseExtension
import com.novoda.gradle.release.PublishExtension
import java.util.Properties

plugins {
id("com.android.library")
id("com.novoda.bintray-release")
}
//apply(plugin = "com.android.library")
//apply(from = "build_test.gradle")

configure<BaseExtension> {
compileSdkVersion(property("COMPILE_SDK_VERSION").toString().toInt())
Expand All @@ -16,6 +17,8 @@ configure<BaseExtension> {
versionName = property("VERSION_NAME").toString()

consumerProguardFiles("proguard-rules.pro")

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -29,6 +32,22 @@ configure<BaseExtension> {
dependencies {
compileOnly(project(":sketch-gif"))
implementation("androidx.annotation:annotation:${property("ANDROIDX_ANNOTATION")}")

testImplementation("junit:junit:${property("JUNIT_VERSION")}")
androidTestImplementation("com.android.support.test:runner:${property("ANDROIDX_TEST_RUNNER")}")
androidTestImplementation("com.android.support.test:rules:${property("ANDROIDX_TEST_RULES")}")
androidTestImplementation("androidx.test.espresso:espresso-core:${property("ANDROIDX_TEST_ESPRESSO")}")
}

//apply(from = "build_upload.gradle")
Properties().apply { project.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) } }.takeIf { !it.isEmpty }?.let { localProperties ->
configure<PublishExtension> {
groupId = "me.panpf"
artifactId = "sketch"
publishVersion = property("VERSION_NAME").toString()
desc = "Android, Image, Load, GIF"
website = "https://github.com/panpf/sketch"
userOrg = localProperties.getProperty("bintray.userOrg")
bintrayUser = localProperties.getProperty("bintray.user")
bintrayKey = localProperties.getProperty("bintray.apikey")
}
}
21 changes: 0 additions & 21 deletions sketch/build_test.gradle.kts

This file was deleted.

Loading

0 comments on commit af97421

Please sign in to comment.