Skip to content

Commit 9f1c2d0

Browse files
authored
Merge pull request #7 from josectobar/feat/gradle
Android: Added build gradle compatibility. - This changes enables compatibility when building your project using commands such as `.gradlew assembleRelease`.
2 parents aeb8cfc + 8df0c79 commit 9f1c2d0

File tree

9 files changed

+296
-13
lines changed

9 files changed

+296
-13
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Wifi configuration.
44
This library was written to config iot devices. With iOS 11 Apple introduced NEHotspotConfiguration class for wifi configuration. Library supports same functionality on ios and android.
55

6+
## 1.0.6
7+
8+
Android: Added build gradle compatibility.
9+
10+
- This changes enables compatibility when building your project using commands such as `.gradlew assembleRelease`.
11+
612
## 1.0.5
713

814
Android: Added `forceWifiUsage` method. to use this method, do the following steps:

android/build.gradle

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
1+
buildscript {
2+
repositories {
3+
google()
4+
jcenter()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.5.2'
9+
}
10+
}
11+
112
apply plugin: 'com.android.library'
213

314
android {
4-
compileSdkVersion 26
15+
compileSdkVersion 28
516
buildToolsVersion '28.0.3'
617

718
defaultConfig {
819
minSdkVersion 21
9-
targetSdkVersion 26
20+
targetSdkVersion 28
1021
versionCode 1
1122
versionName "1.0"
12-
ndk {
13-
abiFilters "armeabi-v7a", "x86"
14-
}
1523
}
16-
lintOptions {
17-
warning 'InvalidPackage'
24+
}
25+
26+
repositories {
27+
maven {
28+
url "$projectDir/../node_modules/react-native/android"
1829
}
30+
google()
31+
jcenter()
1932
}
2033

2134
dependencies {
22-
implementation 'com.facebook.react:react-native:0.20.1+'
23-
}
35+
//noinspection GradleDynamicVersion
36+
implementation 'com.facebook.react:react-native:+'
37+
}

android/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
android.enableJetifier=true
2+
android.useAndroidX=true

android/gradlew

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

android/gradlew.bat

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

android/src/main/java/com/tadasr/IOTWifi/IOTWifiPackage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
1919
modules.add(new IOTWifiModule(reactContext));
2020
return modules;
2121
}
22-
@Override
22+
2323
public List<Class<? extends JavaScriptModule>> createJSModules() {
2424
return Collections.emptyList();
2525
}

android/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Oct 30 14:01:06 CET 2019
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@josectobar/react-native-iot-wifi",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Connect to WiFi with React Native on Android and iOS.",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -25,7 +25,8 @@
2525
"iot"
2626
],
2727
"authors": [
28-
"tadasr", "josectobar"
28+
"tadasr",
29+
"josectobar"
2930
],
3031
"license": "MIT",
3132
"bugs": {
@@ -40,4 +41,4 @@
4041
"test": "echo \"Error: no test specified\" && exit 1"
4142
},
4243
"author": "josectobar"
43-
}
44+
}

0 commit comments

Comments
 (0)