Skip to content

Commit 88b1f50

Browse files
committed
Added a base Android project to build and deliver this plugin with jitpack.io
1 parent d4078a1 commit 88b1f50

File tree

49 files changed

+899
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+899
-4
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
android/

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,22 @@ pod 'cordova-plugin-nativeview', :git => 'https://github.com/mfdeveloper/cordova
4949

5050
**ANDROID**
5151

52-
Until here, this plugin is not registered on cloud. In future, this plugin will be on [jcenter](https://bintray.com/bintray/jcenter) and/or [mavencentral](https://search.maven.org/). By now, you need:
52+
53+
Add this code snippet below to your `build.gradle` file
54+
55+
```groovy
56+
allprojects {
57+
repositories {
58+
...
59+
maven { url 'https://jitpack.io' }
60+
}
61+
}
62+
63+
implementation ('com.github.mfdeveloper:cordova-plugin-nativeview:0.0.4')
64+
```
65+
> This dependency is added using [jitpack](https://jitpack.io)
66+
67+
Or add, the `NativeView` class directly to your android project:
5368

5469
* From your cordova project:
5570

android/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

android/.idea/gradle.xml

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

android/.idea/misc.xml

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

android/.idea/modules.xml

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

android/.idea/runConfigurations.xml

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

android/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

android/app/build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
7+
android {
8+
compileSdkVersion 26
9+
defaultConfig {
10+
applicationId "br.com.mfdeveloper.cordova"
11+
minSdkVersion 19
12+
targetSdkVersion 26
13+
versionCode 1
14+
versionName "1.0"
15+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
}
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
}
24+
25+
dependencies {
26+
implementation fileTree(dir: 'libs', include: ['*.jar'])
27+
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
28+
implementation 'com.android.support:appcompat-v7:26.1.0'
29+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
30+
testImplementation 'junit:junit:4.12'
31+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
32+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
33+
}

android/app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

0 commit comments

Comments
 (0)