Skip to content

Commit

Permalink
issue138 - Update dependencies and to Gradle 6 along with permission …
Browse files Browse the repository at this point in the history
…refinement (#140)
  • Loading branch information
isuPatches authored Jan 8, 2020
1 parent dc056a2 commit 8f616a2
Show file tree
Hide file tree
Showing 189 changed files with 3,839 additions and 3,245 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
ci_checks:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
- image: circleci/android:api-29
environment:
JVM_OPTS: -Xmx3200m
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A description of what you expected to happen.
A description of what actually happened

**Additional Information**
- Device (i.e. Nexus 5x):
- OS Version (i.e. Android 8.1):
- Device (f.e. Nexus 5x):
- OS Version (f.e. Android 8.1):
- Rooted:
- Using legacy connection logic?:
- Using legacy search logic?:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ about: Suggest an idea for this project
Thank you for creating an issue to improve this library! Please check Please check [the current issues](https://github.com/isuPatches/WiseFy/issues) to make sure that the improvement isn't already being worked on.

**Description**
A clear and concise high-level description of the request. (i.e. As a developer I want ___ so that ___)
A clear and concise high-level description of the request. (f.e. As a developer I want ___ so that ___)

**Reason**
A brief explanation as to why it matters to you and your project.

**Acceptance Criteria**
Describe in more detail the request. (i.e. - a method is added to the library, - the method when called does ___, etc.)
Describe in more detail the request. (f.e. - a method is added to the library, - the method when called does ___, etc.)

**Additional context**
Add any other context about the request here.
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

/.idea/*.xml
/.idea/caches/*
/.idea/libraries/*
/.idea/libraries/*
/.idea/codestyles/*
2 changes: 2 additions & 0 deletions .idea/dictionaries/patches.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

176 changes: 176 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ For the sake of transparency and because you're probably curious as to what perm

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
```

<strong> * NOTE * </strong>

If access points or SSIDs are not being returned on >= 6.x devices but there are visible networks, it's most likely because you haven't asked in your application for the `Manifest.permission.ACCESS_COARSE_LOCATION` permission which is what allows us to see the access points nearby. This permission request will not be added to the WiseFy library to reduce package bloat and so users can determine their own UI/UX.
If access points or SSIDs are not being returned on >= 6.x devices but there are visible networks, it's most likely because you haven't asked in your application for the `Manifest.permission.ACCESS_FINE_LOCATION` permission which is what allows us to see the access points nearby. This permission request will not be added to the WiseFy library to reduce package bloat and so users can determine their own UI/UX.

Please check [the sample app](/wisefysample) for an example of how to request permissions for WiseFy.

Expand Down
25 changes: 13 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
buildscript {

project.ext {
agp_version = '3.4.1'
agp_version = '3.5.3'
bintray_version = '1.8.4'
cpd_version = '2.0'
cpd_version = '3.1'
dokka_version = '0.9.18'
dexcount_version = '0.8.5'
jacoco_version = '0.8.3'
kotlin_version = "1.3.40"
dexcount_version = '1.0.0'
jacoco_version = '0.8.5'
kotlin_version = "1.3.61"
maven_version = '2.1'
}

Expand Down Expand Up @@ -37,8 +38,8 @@ buildscript {
}

plugins {
id "io.gitlab.arturbosch.detekt" version "1.0.0-RC14"
id "org.jlleitschuh.gradle.ktlint" version "7.3.0"
id "io.gitlab.arturbosch.detekt" version "1.2.2"
id "org.jlleitschuh.gradle.ktlint" version "9.1.1"
}

apply from: rootProject.file("$rootProject.projectDir/gradle/versions.gradle")
Expand Down Expand Up @@ -84,7 +85,7 @@ task clean(type: Delete) {
project.ext.preDexLibs = !project.hasProperty('disablePreDex')

subprojects {
project.plugins.whenPluginAdded { plugin ->
project.plugins.whenPluginAdded { final plugin ->
if (rootProject.ext.has('preDexLibs')) {
if ("com.android.build.gradle.AppPlugin" == plugin.class.name) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
Expand Down Expand Up @@ -127,11 +128,11 @@ ext {
POM_DEVELOPER_EMAIL = "isuPatches@yahoo.com"

// Common build version details
BUILD_TOOLS_VERSION = '28.0.3'
BUILD_TOOLS_VERSION = '29.0.2'
MAX_SDK_VERSION = 28
MIN_SDK_VERSION = 16
VERSION_CODE = 14
VERSION_NAME = "4.0.0"
VERSION_CODE = 15
VERSION_NAME = "4.1.0"
}

task makeGoodChoices {
Expand All @@ -147,4 +148,4 @@ task makeGoodChoices {
"\n# You may now push the awesome to origin :) #" +
"\n#############################################"
}
}
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
org.gradle.jvmargs=-Xmx1g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Android X: https://developer.android.com/topic/libraries/support-library/androidx-rn
android.enableJetifier=true
android.useAndroidX=true

org.gradle.caching=false
org.gradle.jvmargs=-Xmx1g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 changes: 5 additions & 5 deletions gradle/gradle-bintray-upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ artifacts {
}

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

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
def gpg_passphrase = properties.getProperty("bintray.gpg_passphrase")
user = properties.getProperty("bintray.user")
final def gpgPassphrase = properties.getProperty("bintray.gpg_passphrase")

println("user: " + user)
println("key: " + key)
println("gpg_passphrase: " + gpg_passphrase)
println("gpg_passphrase: " + gpgPassphrase)

configurations = ['archives']

Expand All @@ -65,7 +65,7 @@ bintray {
desc = LIBRARY_DESCRIPTION
gpg {
sign = true // Determines whether to GPG sign the files. The default is false
passphrase = gpg_passphrase
passphrase = gpgPassphrase
// Optional. The passphrase for GPG signing'
}
}
Expand Down
14 changes: 7 additions & 7 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jacoco {
toolVersion = "$jacoco_version"
}

def srcDirs = ["src/main/java"]
final def srcDirs = ["src/main/java"]

def excludes = [
final def excludes = [
'**/R.class',
'**/R$*.class',
'**/*$ViewBinder*.*',
Expand All @@ -20,9 +20,9 @@ def excludes = [
]

project.afterEvaluate {
def variants = getVariants()
final def variants = getVariants()
if (variants != null) {
variants.all { variant ->
variants.all { final variant ->
if (variant.name.toLowerCase().contains("release")) {
return
}
Expand Down Expand Up @@ -140,12 +140,12 @@ project.afterEvaluate {
}
}

private def getClassDirs(String javaDirSuffix, String kotlinDirSuffix, excludes) {
def java = fileTree(
private def getClassDirs(final String javaDirSuffix, final String kotlinDirSuffix, final excludes) {
final def java = fileTree(
dir: "${buildDir}/intermediates/classes/${javaDirSuffix}",
excludes: excludes
)
def kotlin = fileTree(
final def kotlin = fileTree(
dir: "${buildDir}/tmp/kotlin-classes/${kotlinDirSuffix}",
excludes: excludes
)
Expand Down
8 changes: 6 additions & 2 deletions gradle/ktlint.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ ktlint {
debug = true
verbose = true
android = true
reporters = ["PLAIN", "CHECKSTYLE"]
reporters {
reporter "plain"
reporter "checkstyle"

}
ignoreFailures = false
}
}
24 changes: 12 additions & 12 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
ext {
androidx_appcompat_version = "1.1.0-beta01"
androidx_constraintlayout_version = "2.0.0-beta2"
androidx_appcompat_version = "1.1.0"
androidx_constraintlayout_version = "2.0.0-beta4"
androidx_support_annotations_version = '1.0.0'
androidx_core_ktx_version = '1.0.2'
androidx_core_ktx_version = '1.1.0'
androidx_core_test_version = '1.1.0'

google_android_material_version = "1.1.0-alpha07"
google_android_material_version = "1.2.0-alpha03"

dagger_version = "2.23.2"
dagger_version = "2.25.4"

detekt_version = "1.0.0-RC15"
ktlint_version = "0.33.0"
detekt_version = "1.3.1"
ktlint_version = "0.36.0"

rxandroid_version = '2.1.1'
rxjava_version = '2.2.10'
rxjava_version = '2.2.15'

// Test deps
junit_version = '4.12'
mockito_version = '2.28.2'
mockito_kotlin_version = '2.1.0'
mockito_version = '3.2.4'
mockito_kotlin_version = '2.2.0'

androidx_espresso_core_version = '3.1.1'
androidx_test_runner_version = "1.1.1"
androidx_espresso_core_version = '3.2.0'
androidx_test_runner_version = '1.2.0'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 15 additions & 20 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
6 changes: 2 additions & 4 deletions wisefy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ android {
showAll true
explainIssues true
abortOnError true
// UnusedIds is disabled for Kotlin synthetics and MissingRegistered is disabled for androidx.
disable 'UnusedIds', 'MissingRegistered'
disable 'UnusedIds' // UnusedIds is disabled for Kotlin synthetics
}

testOptions {
Expand All @@ -74,7 +73,7 @@ android {
}

sourceSets {
def commonTestDir = 'src/commonTest/java'
final def commonTestDir = 'src/commonTest/java'

test { java.srcDir commonTestDir }

Expand All @@ -85,7 +84,6 @@ android {
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.annotation:annotation:$androidx_support_annotations_version"

// Kotlin
Expand Down
2 changes: 0 additions & 2 deletions wisefy/consumer-proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
-keep class com.isupatches.wisefy.** { *; }
-keep public interface com.isupatches.wisefy.** { *; }
3 changes: 0 additions & 3 deletions wisefy/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
-verbose

-dontobfuscate

-keep class com.isupatches.wisefy.** { *; }
-keep public interface com.isupatches.wisefy.** { *; }
1 change: 1 addition & 0 deletions wisefy/proguard-test-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-include proguard-rules.pro
Loading

0 comments on commit 8f616a2

Please sign in to comment.