Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit a48d176

Browse files
Update gradle, add a mock for Stetho.initializeWithDefaults()
1 parent ad1c2fb commit a48d176

File tree

4 files changed

+25
-132
lines changed

4 files changed

+25
-132
lines changed

build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
google()
67
}
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
9-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
10-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
9+
classpath 'com.android.tools.build:gradle:4.0.2'
10+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
@@ -17,6 +17,10 @@ buildscript {
1717
allprojects {
1818
repositories {
1919
jcenter()
20+
maven {
21+
url "https://maven.google.com"
22+
}
23+
google()
2024
}
2125
}
2226

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
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-6.4.1-all.zip

stetho-no-op/build.gradle

Lines changed: 13 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,35 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
3-
apply plugin: 'com.jfrog.bintray'
4-
5-
def gitHubUsername = "iGenius-Srl"
6-
def gitHubProjectName = "stetho-no-op"
7-
8-
// start - do not modify this if your project is on github
9-
def siteUrl = "https://github.com/${gitHubUsername}/${gitHubProjectName}"
10-
def gitUrl = siteUrl + '.git'
11-
def bugTrackerUrl = siteUrl + '/issues/'
12-
def projectName = gitHubProjectName
13-
// end - do not modify this if your project is on github
14-
15-
def projectDesc = "Stetho no operation library for production"
16-
def projectGroup = "net.igenius"
17-
def projectLicenses = ["Apache-2.0"]
18-
def projectLicenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
19-
def projectKeywords = ['stetho', 'no', 'op']
20-
def developerFullName = "iGenius Srl"
21-
group = projectGroup
22-
version = "1.1"
23-
24-
def sdkVersion = 24;
25-
def toolsVersion = "24.0.3";
263

274
android {
28-
compileSdkVersion sdkVersion
29-
buildToolsVersion toolsVersion
5+
compileSdkVersion 30
6+
307
defaultConfig {
318
minSdkVersion 16
32-
targetSdkVersion sdkVersion
33-
versionCode 2
34-
versionName version
9+
targetSdkVersion 30
10+
versionCode 3
11+
versionName "1.2"
3512
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3613
}
14+
3715
buildTypes {
3816
release {
3917
minifyEnabled false
4018
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4119
}
4220
}
43-
lintOptions {
44-
warning 'InvalidPackage'
21+
22+
compileOptions {
23+
sourceCompatibility JavaVersion.VERSION_1_8
24+
targetCompatibility JavaVersion.VERSION_1_8
4525
}
4626
}
4727

4828
dependencies {
49-
compile fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation fileTree(dir: 'libs', include: ['*.jar'])
5030
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
5131
exclude group: 'com.android.support', module: 'support-annotations'
5232
})
5333
testCompile 'junit:junit:4.12'
54-
compile 'com.squareup.okhttp3:okhttp:3.+'
55-
}
56-
57-
// add the following information to the file: local.properties situated in the parent directory of
58-
// where this file is:
59-
//
60-
// bintray.user=yourusername
61-
// bintray.apikey=api key got from the bintray profile
62-
//
63-
// be sure to add local.properties to the .gitignore!
64-
65-
Properties properties = new Properties()
66-
if (project.rootProject.file("local.properties").exists()) {
67-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
68-
}
69-
70-
install {
71-
repositories.mavenInstaller {
72-
pom.project {
73-
name projectName
74-
description projectDesc
75-
packaging 'aar'
76-
groupId projectGroup
77-
version version
78-
url siteUrl
79-
licenses {
80-
license {
81-
name projectLicenses[0]
82-
url projectLicenseUrl
83-
}
84-
}
85-
developers {
86-
developer {
87-
id properties.getProperty("bintray.user")
88-
name developerFullName
89-
}
90-
}
91-
scm {
92-
connection gitUrl
93-
developerConnection gitUrl
94-
url siteUrl
95-
96-
}
97-
}
98-
}
99-
}
100-
101-
bintray {
102-
user = properties.getProperty("bintray.user")
103-
key = properties.getProperty("bintray.apikey")
104-
configurations = ['archives']
105-
pkg {
106-
repo = "maven"
107-
name = projectName
108-
desc = projectDesc
109-
websiteUrl = siteUrl
110-
vcsUrl = gitUrl
111-
issueTrackerUrl = bugTrackerUrl
112-
licenses = projectLicenses
113-
labels = projectKeywords
114-
publicDownloadNumbers = true
115-
publish = true
116-
}
117-
}
118-
119-
task sourcesJar(type: Jar) {
120-
from android.sourceSets.main.java.srcDirs
121-
classifier = 'sources'
122-
}
123-
124-
task javadoc(type: Javadoc) {
125-
title = "$projectName $project.version API"
126-
description "Generates Javadoc"
127-
source = android.sourceSets.main.java.srcDirs
128-
classpath += files(android.bootClasspath)
129-
exclude '**/BuildConfig.java', '**/R.java'
130-
options {
131-
windowTitle("$projectName $project.version Reference")
132-
locale = 'en_US'
133-
encoding = 'UTF-8'
134-
charSet = 'UTF-8'
135-
links("http://docs.oracle.com/javase/7/docs/api/");
136-
linksOffline("http://d.android.com/reference", "${android.sdkDirectory}/docs/reference");
137-
setMemberLevel(JavadocMemberLevel.PUBLIC)
138-
}
139-
}
140-
141-
task javadocJar(type: Jar, dependsOn: javadoc) {
142-
classifier = 'javadoc'
143-
from javadoc.destinationDir
144-
}
145-
146-
artifacts {
147-
archives javadocJar
148-
archives sourcesJar
149-
}
150-
34+
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
35+
}

stetho-no-op/src/main/java/com/facebook/stetho/Stetho.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public static void initialize(Initializer initializer) {
1515

1616
}
1717

18+
public static void initializeWithDefaults(final Context context) {
19+
20+
}
21+
1822
public static DumperPluginsProvider defaultDumperPluginsProvider(Context context) {
1923
return null;
2024
}

0 commit comments

Comments
 (0)