Skip to content

Commit

Permalink
Update gradle, add a mock for Stetho.initializeWithDefaults()
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sukharev-cs committed Oct 8, 2020
1 parent ad1c2fb commit a48d176
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 132 deletions.
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -17,6 +17,10 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
141 changes: 13 additions & 128 deletions stetho-no-op/build.gradle
Original file line number Diff line number Diff line change
@@ -1,150 +1,35 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

def gitHubUsername = "iGenius-Srl"
def gitHubProjectName = "stetho-no-op"

// start - do not modify this if your project is on github
def siteUrl = "https://github.com/${gitHubUsername}/${gitHubProjectName}"
def gitUrl = siteUrl + '.git'
def bugTrackerUrl = siteUrl + '/issues/'
def projectName = gitHubProjectName
// end - do not modify this if your project is on github

def projectDesc = "Stetho no operation library for production"
def projectGroup = "net.igenius"
def projectLicenses = ["Apache-2.0"]
def projectLicenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
def projectKeywords = ['stetho', 'no', 'op']
def developerFullName = "iGenius Srl"
group = projectGroup
version = "1.1"

def sdkVersion = 24;
def toolsVersion = "24.0.3";

android {
compileSdkVersion sdkVersion
buildToolsVersion toolsVersion
compileSdkVersion 30

defaultConfig {
minSdkVersion 16
targetSdkVersion sdkVersion
versionCode 2
versionName version
targetSdkVersion 30
versionCode 3
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
warning 'InvalidPackage'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.squareup.okhttp3:okhttp:3.+'
}

// add the following information to the file: local.properties situated in the parent directory of
// where this file is:
//
// bintray.user=yourusername
// bintray.apikey=api key got from the bintray profile
//
// be sure to add local.properties to the .gitignore!

Properties properties = new Properties()
if (project.rootProject.file("local.properties").exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

install {
repositories.mavenInstaller {
pom.project {
name projectName
description projectDesc
packaging 'aar'
groupId projectGroup
version version
url siteUrl
licenses {
license {
name projectLicenses[0]
url projectLicenseUrl
}
}
developers {
developer {
id properties.getProperty("bintray.user")
name developerFullName
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = projectName
desc = projectDesc
websiteUrl = siteUrl
vcsUrl = gitUrl
issueTrackerUrl = bugTrackerUrl
licenses = projectLicenses
labels = projectKeywords
publicDownloadNumbers = true
publish = true
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
title = "$projectName $project.version API"
description "Generates Javadoc"
source = android.sourceSets.main.java.srcDirs
classpath += files(android.bootClasspath)
exclude '**/BuildConfig.java', '**/R.java'
options {
windowTitle("$projectName $project.version Reference")
locale = 'en_US'
encoding = 'UTF-8'
charSet = 'UTF-8'
links("http://docs.oracle.com/javase/7/docs/api/");
linksOffline("http://d.android.com/reference", "${android.sdkDirectory}/docs/reference");
setMemberLevel(JavadocMemberLevel.PUBLIC)
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

implementation 'com.squareup.okhttp3:okhttp:3.10.0'
}
4 changes: 4 additions & 0 deletions stetho-no-op/src/main/java/com/facebook/stetho/Stetho.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public static void initialize(Initializer initializer) {

}

public static void initializeWithDefaults(final Context context) {

}

public static DumperPluginsProvider defaultDumperPluginsProvider(Context context) {
return null;
}
Expand Down

0 comments on commit a48d176

Please sign in to comment.