Skip to content

Commit 221038c

Browse files
committed
- Init project
- Add publish scripts - Add Travis script
1 parent 4b134e8 commit 221038c

37 files changed

+1782
-0
lines changed

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
sudo: required
2+
language: java
3+
jdk: oraclejdk8
4+
dist: trusty
5+
os:
6+
- linux
7+
git:
8+
depth: false
9+
submodules: false
10+
11+
before_install:
12+
- "chmod +x ./Android/gradlew"
13+
14+
script:
15+
- yes | ./Android/gradlew tasks --scan
16+
- yes | ./Android/gradlew tasks --all
17+
18+
before_cache:
19+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
20+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
21+
22+
cache:
23+
directories:
24+
- $HOME/.gradle/caches/
25+
- $HOME/.gradle/wrapper/
26+
- $HOME/.android/build-cache
27+
28+
after_success:
29+
- bash <(curl -s https://codecov.io/bash) -t 9166c3b5-d71b-4714-95aa-3fd6811d59dc

Android/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

Android/.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/gradle.xml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/jarRepositories.xml

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/misc.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/.idea/runConfigurations.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Android/Core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Android/Core/build.gradle

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'kotlin-android'
4+
}
5+
6+
android {
7+
compileSdkVersion 30
8+
buildToolsVersion "30.0.3"
9+
10+
defaultConfig {
11+
minSdkVersion 21
12+
targetSdkVersion 30
13+
versionCode 1
14+
versionName "1.0"
15+
16+
consumerProguardFiles "consumer-rules.pro"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
26+
compileOptions {
27+
sourceCompatibility JavaVersion.VERSION_1_8
28+
targetCompatibility JavaVersion.VERSION_1_8
29+
}
30+
31+
kotlinOptions {
32+
jvmTarget = '1.8'
33+
}
34+
}
35+
36+
dependencies {
37+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38+
implementation 'androidx.core:core-ktx:1.6.0'
39+
implementation 'androidx.appcompat:appcompat:1.3.0'
40+
implementation 'com.google.android.material:material:1.4.0'
41+
}
42+
43+
ext {
44+
PUBLISH_GROUP_ID = 'com.apachat'
45+
PUBLISH_VERSION = '1.0.11'
46+
PUBLISH_ARTIFACT_ID = 'loadingbutton-android'
47+
}
48+
49+
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"

Android/Core/consumer-rules.pro

Whitespace-only changes.

Android/Core/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="com.apachat.loadingbutton.core" />
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.apachat.loadingbutton.core
2+
3+
import android.animation.Animator
4+
import android.view.View
5+
6+
internal fun Animator.disposeAnimator() {
7+
end()
8+
removeAllListeners()
9+
cancel()
10+
}
11+
12+
internal fun View.updateWidth(width: Int) {
13+
val layoutParams = this.layoutParams
14+
layoutParams.width = width
15+
this.layoutParams = layoutParams
16+
}
17+
18+
internal fun View.updateHeight(height: Int) {
19+
val layoutParams = this.layoutParams
20+
layoutParams.height = height
21+
this.layoutParams = layoutParams
22+
}

0 commit comments

Comments
 (0)