Skip to content

Commit af1d44f

Browse files
committed
Update gradle environment and support library to latest version
1 parent a38d288 commit af1d44f

24 files changed

+163
-449
lines changed

build.gradle

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
ext {
3+
// Package information for bintray
4+
pkginfo = [name : ARTIFACT_NAME,
5+
description: ARTIFACT_DESCRIPTION,
6+
site : SITE_URL,
7+
issue : ISSUE_URL,
8+
vcs : SCM_URL]
9+
}
210

311
buildscript {
412
repositories {
13+
google()
514
mavenCentral()
6-
jcenter()
715
maven {
816
url "https://plugins.gradle.org/m2/"
917
}
18+
jcenter()
1019
}
1120
dependencies {
12-
classpath 'com.android.tools.build:gradle:2.2.2'
13-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
14-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
15-
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1'
21+
classpath 'com.android.tools.build:gradle:3.3.1'
22+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
23+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
24+
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
25+
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0'
1626

1727
// NOTE: Do not place your application dependencies here; they belong
1828
// in the individual module build.gradle files
@@ -25,7 +35,12 @@ allprojects {
2535
group = GROUP
2636

2737
repositories {
38+
google()
2839
mavenCentral()
2940
jcenter()
3041
}
3142
}
43+
44+
task clean(type: Delete) {
45+
delete rootProject.buildDir
46+
}

demo/build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion COMPILE_SDK_VERSION as int
5-
buildToolsVersion BUILD_TOOLS_VERSION
65

76
defaultConfig {
8-
minSdkVersion 10
7+
minSdkVersion 14
98
targetSdkVersion COMPILE_SDK_VERSION as int
109
versionCode VERSION_CODE as int
1110
versionName VERSION_NAME
@@ -36,7 +35,7 @@ android {
3635
}
3736

3837
dependencies {
39-
compile project(':library')
40-
compile project(':utils-v4')
41-
compile 'com.android.support:appcompat-v7:22.2.1'
38+
implementation project(':library')
39+
implementation project(':utils-v4')
40+
implementation "com.android.support:appcompat-v7:${ANDROID_SUPPORT_VERSION}"
4241
}

demo/src/main/java/com/ogaclejapan/smarttablayout/demo/DemoActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.content.Intent;
55
import android.os.Bundle;
66
import android.support.v4.view.ViewPager;
7-
import android.support.v7.app.ActionBarActivity;
87
import android.support.v7.app.AppCompatActivity;
98
import android.support.v7.widget.Toolbar;
109
import android.view.LayoutInflater;

demo/src/main/java/com/ogaclejapan/smarttablayout/demo/DemoLikeMediumActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.content.Intent;
55
import android.os.Bundle;
66
import android.support.v4.view.ViewPager;
7-
import android.support.v7.app.ActionBarActivity;
87
import android.support.v7.app.AppCompatActivity;
98
import android.support.v7.widget.Toolbar;
109
import android.view.LayoutInflater;

demo/src/main/java/com/ogaclejapan/smarttablayout/demo/DemoRtlActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.content.Intent;
55
import android.os.Bundle;
66
import android.support.v4.view.ViewPager;
7-
import android.support.v7.app.ActionBarActivity;
87
import android.support.v7.app.AppCompatActivity;
98
import android.support.v7.widget.Toolbar;
109
import android.view.LayoutInflater;

demo/src/main/java/com/ogaclejapan/smarttablayout/demo/MainActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import android.content.Intent;
44
import android.net.Uri;
55
import android.os.Bundle;
6-
import android.support.v7.app.ActionBarActivity;
76
import android.support.v7.app.AppCompatActivity;
87
import android.view.Menu;
98
import android.view.MenuItem;

demo/src/main/java/com/ogaclejapan/smarttablayout/demo/TintableImageView.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import android.content.Context;
44
import android.content.res.ColorStateList;
55
import android.content.res.TypedArray;
6+
import android.support.v7.widget.AppCompatImageView;
67
import android.util.AttributeSet;
7-
import android.widget.ImageView;
88

99
/**
1010
* https://gist.github.com/tylerchesley/5d15d859be4f3ce31213
1111
*/
12-
public class TintableImageView extends ImageView {
12+
public class TintableImageView extends AppCompatImageView {
1313

1414
private ColorStateList tint;
1515

demo/src/main/res/values-w820dp/dimens.xml

-6
This file was deleted.

gradle.properties

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
VERSION_NAME=1.6.1
2-
VERSION_CODE=16
3-
BUILD_TOOLS_VERSION=24.0.3
4-
COMPILE_SDK_VERSION=24
1+
VERSION_NAME=1.7.0
2+
VERSION_CODE=17
3+
COMPILE_SDK_VERSION=28
4+
ANDROID_SUPPORT_VERSION=28.0.0
55

66
GROUP=com.ogaclejapan.smarttablayout
77
ARTIFACT_NAME=SmartTabLayout
@@ -18,4 +18,3 @@ LICENCE_DIST=repo
1818
DEVELOPER_ID=ogaclejapan
1919
DEVELOPER_NAME=Masaki Ogata
2020
DEVELOPER_EMAIL[email protected]
21-
1

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

library/build.gradle

+5-140
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
3-
apply plugin: 'com.jfrog.bintray'
2+
apply plugin: 'com.github.ben-manes.versions'
43
apply plugin: 'com.github.hierynomus.license'
54

65
android {
76
compileSdkVersion COMPILE_SDK_VERSION as int
8-
buildToolsVersion BUILD_TOOLS_VERSION
97
resourcePrefix 'stl_'
108

119
defaultConfig {
12-
minSdkVersion 4
10+
minSdkVersion 14
1311
targetSdkVersion COMPILE_SDK_VERSION as int
1412
versionCode VERSION_CODE as int
1513
versionName VERSION_NAME
@@ -21,13 +19,10 @@ android {
2119
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2220
}
2321
}
24-
lintOptions {
25-
abortOnError false
26-
}
2722
}
2823

2924
dependencies {
30-
compile "com.android.support:support-v4:22.2.1"
25+
implementation "com.android.support:support-v4:${ANDROID_SUPPORT_VERSION}"
3126
}
3227

3328
license {
@@ -41,135 +36,5 @@ license {
4136

4237
}
4338

44-
afterEvaluate { project ->
45-
46-
task sourcesJar(type: Jar) {
47-
from android.sourceSets.main.java.srcDirs
48-
classifier = 'sources'
49-
}
50-
51-
task javadoc(type: Javadoc) {
52-
failOnError false
53-
source = android.sourceSets.main.java.srcDirs
54-
options {
55-
links "http://docs.oracle.com/javase/7/docs/api/"
56-
linksOffline "http://d.android.com/reference", System.getenv("ANDROID_HOME") + "/docs/reference"
57-
}
58-
classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
59-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
60-
61-
}
62-
63-
task javadocJar(type: Jar, dependsOn: javadoc) {
64-
classifier = 'javadoc'
65-
from javadoc.destinationDir
66-
}
67-
68-
artifacts {
69-
archives javadocJar
70-
archives sourcesJar
71-
}
72-
73-
}
74-
75-
install {
76-
repositories.mavenInstaller {
77-
// This generates POM.xml with proper parameters
78-
pom {
79-
project {
80-
packaging 'aar'
81-
82-
name ARTIFACT_NAME
83-
description ARTIFACT_DESCRIPTION
84-
url SITE_URL
85-
86-
licenses {
87-
license {
88-
name LICENCE_NAME
89-
url LICENCE_URL
90-
distribution LICENCE_DIST
91-
}
92-
}
93-
94-
developers {
95-
developer {
96-
id DEVELOPER_ID
97-
name DEVELOPER_NAME
98-
email DEVELOPER_EMAIL
99-
}
100-
}
101-
issueManagement {
102-
system ISSUE_SYSTEM
103-
url ISSUE_URL
104-
}
105-
106-
scm {
107-
connection SCM_CONNECTION
108-
developerConnection SCM_DEV_CONNECTION
109-
url SCM_URL
110-
111-
}
112-
}
113-
}
114-
}
115-
}
116-
117-
def getNexusUser() {
118-
return hasProperty('NEXUS_USER') ? NEXUS_USER : ""
119-
}
120-
121-
def getNexusPassword() {
122-
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
123-
}
124-
125-
def getBintrayUser() {
126-
return hasProperty('BINTRAY_USER') ? BINTRAY_USER : ""
127-
}
128-
129-
def getBintrayApiKey() {
130-
return hasProperty('BINTRAY_APIKEY') ? BINTRAY_APIKEY : ""
131-
}
132-
133-
def getGpgPassphrase() {
134-
return hasProperty('BINTRAY_GPG_PASSPHRASE') ? BINTRAY_GPG_PASSPHRASE : ""
135-
}
136-
137-
bintray {
138-
139-
user = bintrayUser
140-
key = bintrayApiKey
141-
142-
configurations = ['archives']
143-
144-
dryRun = false
145-
publish = true
146-
147-
pkg {
148-
repo = "maven"
149-
name = ARTIFACT_NAME
150-
desc = ARTIFACT_DESCRIPTION
151-
websiteUrl = SITE_URL
152-
issueTrackerUrl = ISSUE_URL
153-
vcsUrl = SCM_URL
154-
licenses = ["Apache-2.0"]
155-
labels = ['android']
156-
publicDownloadNumbers = true
157-
158-
version {
159-
gpg {
160-
sign = true
161-
passphrase = gpgPassphrase
162-
}
163-
164-
mavenCentralSync {
165-
sync = true
166-
user = nexusUser
167-
password = nexusPassword
168-
close = '1'
169-
}
170-
171-
}
172-
173-
}
174-
175-
}
39+
pkginfo.name = ARTIFACT_NAME
40+
apply from: "${project.rootDir}/publish.gradle"

0 commit comments

Comments
 (0)