Skip to content

Commit 8b7aec4

Browse files
committed
Changed android project from Kotlin to pure Java version
This cause problems when use this project released like a jitpack dependency into an another Java project
1 parent 5bc0d1b commit 8b7aec4

File tree

24 files changed

+308
-147
lines changed

24 files changed

+308
-147
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ allprojects {
6060
}
6161
}
6262
63-
implementation ('com.github.mfdeveloper:cordova-plugin-nativeview:0.0.4')
63+
implementation ('com.github.mfdeveloper:cordova-plugin-nativeview:0.0.5')
6464
```
6565
> This dependency is added using [jitpack](https://jitpack.io)
6666

android/.gitignore

Lines changed: 130 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,132 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the ART/Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
out/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
# Android Studio Navigation editor temp files
30+
.navigation/
31+
32+
# Android Studio captures folder
33+
captures/
34+
35+
# IntelliJ
136
*.iml
2-
.gradle
3-
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
6-
.DS_Store
7-
/build
8-
/captures
37+
.idea/workspace.xml
38+
.idea/tasks.xml
39+
.idea/gradle.xml
40+
.idea/assetWizardSettings.xml
41+
.idea/dictionaries
42+
.idea/libraries
43+
.idea/caches
44+
45+
# Keystore files
46+
# Uncomment the following line if you do not want to check your keystore files in.
47+
#*.jks
48+
49+
# External native build folder generated in Android Studio 2.2 and later
950
.externalNativeBuild
51+
52+
# Google Services (e.g. APIs or Firebase)
53+
google-services.json
54+
55+
# Freeline
56+
freeline.py
57+
freeline/
58+
freeline_project_description.json
59+
60+
# fastlane
61+
fastlane/report.xml
62+
fastlane/Preview.html
63+
fastlane/screenshots
64+
fastlane/test_output
65+
fastlane/readme.md
66+
67+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
68+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
69+
70+
# User-specific stuff
71+
.idea/**/workspace.xml
72+
.idea/**/tasks.xml
73+
.idea/**/usage.statistics.xml
74+
.idea/**/dictionaries
75+
.idea/**/shelf
76+
77+
# Generated files
78+
.idea/**/contentModel.xml
79+
80+
# Sensitive or high-churn files
81+
.idea/**/dataSources/
82+
.idea/**/dataSources.ids
83+
.idea/**/dataSources.local.xml
84+
.idea/**/sqlDataSources.xml
85+
.idea/**/dynamic.xml
86+
.idea/**/uiDesigner.xml
87+
.idea/**/dbnavigator.xml
88+
89+
# Gradle
90+
.idea/**/gradle.xml
91+
.idea/**/libraries
92+
93+
# Gradle and Maven with auto-import
94+
# When using Gradle or Maven with auto-import, you should exclude module files,
95+
# since they will be recreated, and may cause churn. Uncomment if using
96+
# auto-import.
97+
# .idea/modules.xml
98+
# .idea/*.iml
99+
# .idea/modules
100+
101+
# CMake
102+
cmake-build-*/
103+
104+
# Mongo Explorer plugin
105+
.idea/**/mongoSettings.xml
106+
107+
# File-based project format
108+
*.iws
109+
110+
# IntelliJ
111+
out/
112+
113+
# mpeltonen/sbt-idea plugin
114+
.idea_modules/
115+
116+
# JIRA plugin
117+
atlassian-ide-plugin.xml
118+
119+
# Cursive Clojure plugin
120+
.idea/replstate.xml
121+
122+
# Crashlytics plugin (for Android Studio and IntelliJ)
123+
com_crashlytics_export_strings.xml
124+
crashlytics.properties
125+
crashlytics-build.properties
126+
fabric.properties
127+
128+
# Editor-based Rest Client
129+
.idea/httpRequests
130+
131+
# Android studio 3.1+ serialized cache file
132+
.idea/caches/build_file_checksums.ser

android/.idea/codeStyles/Project.xml

Lines changed: 29 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: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/build.gradle

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
apply plugin: 'com.android.application'
22

3-
apply plugin: 'kotlin-android'
4-
5-
apply plugin: 'kotlin-android-extensions'
6-
73
android {
8-
compileSdkVersion 26
4+
compileSdkVersion 27
95
defaultConfig {
106
applicationId "br.com.mfdeveloper.cordova"
117
minSdkVersion 19
12-
targetSdkVersion 26
8+
targetSdkVersion 27
139
versionCode 1
1410
versionName "1.0"
1511
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -23,11 +19,12 @@ android {
2319
}
2420

2521
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'
22+
implementation fileTree(include: ['*.jar'], dir: 'libs')
23+
implementation 'com.android.support:appcompat-v7:27.1.1'
24+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
3025
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'
26+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
27+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
28+
implementation 'com.github.mfdeveloper:cordova-android:7.1.1'
29+
implementation project(':lib')
3330
}

android/lib/src/androidTest/java/br/com/mfdeveloper/cordova/lib/ExampleInstrumentedTest.java renamed to android/app/src/androidTest/java/br/com/mfdeveloper/cordova/ExampleInstrumentedTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package br.com.mfdeveloper.cordova.lib;
1+
package br.com.mfdeveloper.cordova;
22

33
import android.content.Context;
44
import android.support.test.InstrumentationRegistry;
@@ -17,10 +17,10 @@
1717
@RunWith(AndroidJUnit4.class)
1818
public class ExampleInstrumentedTest {
1919
@Test
20-
public void useAppContext() throws Exception {
20+
public void useAppContext() {
2121
// Context of the app under test.
2222
Context appContext = InstrumentationRegistry.getTargetContext();
2323

24-
assertEquals("br.com.mfdeveloper.cordova.lib.test", appContext.getPackageName());
24+
assertEquals("br.com.mfdeveloper.cordova", appContext.getPackageName());
2525
}
2626
}

android/app/src/androidTest/java/br/com/mfdeveloper/cordova/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package br.com.mfdeveloper.cordova;
2+
3+
import android.support.v7.app.AppCompatActivity;
4+
import android.os.Bundle;
5+
6+
public class MainActivity extends AppCompatActivity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.activity_main);
12+
}
13+
}

android/app/src/main/java/br/com/mfdeveloper/cordova/MainActivity.kt

Lines changed: 0 additions & 12 deletions
This file was deleted.

android/app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
tools:context="br.com.mfdeveloper.cordova.MainActivity">
7+
tools:context=".MainActivity">
88

99
<TextView
1010
android:layout_width="wrap_content"
@@ -15,4 +15,4 @@
1515
app:layout_constraintRight_toRightOf="parent"
1616
app:layout_constraintTop_toTopOf="parent" />
1717

18-
</android.support.constraint.ConstraintLayout>
18+
</android.support.constraint.ConstraintLayout>

0 commit comments

Comments
 (0)