Skip to content

Commit 72e6e47

Browse files
committed
first commit
0 parents  commit 72e6e47

Some content is hidden

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

44 files changed

+1015
-0
lines changed

.gitignore

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
2+
# Created by https://www.gitignore.io/api/java,kotlin,android,androidstudio
3+
# Edit at https://www.gitignore.io/?templates=java,kotlin,android,androidstudio
4+
5+
### Android ###
6+
# Built application files
7+
*.apk
8+
*.ap_
9+
*.aab
10+
11+
# Files for the ART/Dalvik VM
12+
*.dex
13+
14+
# Java class files
15+
*.class
16+
17+
# Generated files
18+
bin/
19+
gen/
20+
out/
21+
release/
22+
23+
# Gradle files
24+
.gradle/
25+
build/
26+
27+
# Local configuration file (sdk path, etc)
28+
local.properties
29+
30+
# Proguard folder generated by Eclipse
31+
proguard/
32+
33+
# Log Files
34+
*.log
35+
36+
# Android Studio Navigation editor temp files
37+
.navigation/
38+
39+
# Android Studio captures folder
40+
captures/
41+
42+
# IntelliJ
43+
*.iml
44+
.idea/workspace.xml
45+
.idea/tasks.xml
46+
.idea/gradle.xml
47+
.idea/assetWizardSettings.xml
48+
.idea/dictionaries
49+
.idea/libraries
50+
# Android Studio 3 in .gitignore file.
51+
.idea/caches
52+
.idea/modules.xml
53+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
54+
.idea/navEditor.xml
55+
56+
# Keystore files
57+
# Uncomment the following lines if you do not want to check your keystore files in.
58+
#*.jks
59+
#*.keystore
60+
61+
# External native build folder generated in Android Studio 2.2 and later
62+
.externalNativeBuild
63+
64+
# Google Services (e.g. APIs or Firebase)
65+
# google-services.json
66+
67+
# Freeline
68+
freeline.py
69+
freeline/
70+
freeline_project_description.json
71+
72+
# fastlane
73+
fastlane/report.xml
74+
fastlane/Preview.html
75+
fastlane/screenshots
76+
fastlane/test_output
77+
fastlane/readme.md
78+
79+
# Version control
80+
vcs.xml
81+
82+
# lint
83+
lint/intermediates/
84+
lint/generated/
85+
lint/outputs/
86+
lint/tmp/
87+
# lint/reports/
88+
89+
### Android Patch ###
90+
gen-external-apklibs
91+
output.json
92+
93+
### Java ###
94+
# Compiled class file
95+
96+
# Log file
97+
98+
# BlueJ files
99+
*.ctxt
100+
101+
# Mobile Tools for Java (J2ME)
102+
.mtj.tmp/
103+
104+
# Package Files #
105+
*.jar
106+
*.war
107+
*.nar
108+
*.ear
109+
*.zip
110+
*.tar.gz
111+
*.rar
112+
113+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
114+
hs_err_pid*
115+
116+
### Kotlin ###
117+
# Compiled class file
118+
119+
# Log file
120+
121+
# BlueJ files
122+
123+
# Mobile Tools for Java (J2ME)
124+
125+
# Package Files #
126+
127+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
128+
129+
### AndroidStudio ###
130+
# Covers files to be ignored for android development using Android Studio.
131+
132+
# Built application files
133+
134+
# Files for the ART/Dalvik VM
135+
136+
# Java class files
137+
138+
# Generated files
139+
140+
# Gradle files
141+
.gradle
142+
143+
# Signing files
144+
.signing/
145+
146+
# Local configuration file (sdk path, etc)
147+
148+
# Proguard folder generated by Eclipse
149+
150+
# Log Files
151+
152+
# Android Studio
153+
/*/build/
154+
/*/local.properties
155+
/*/out
156+
/*/*/build
157+
/*/*/production
158+
*.ipr
159+
*~
160+
*.swp
161+
162+
# Android Patch
163+
164+
# External native build folder generated in Android Studio 2.2 and later
165+
166+
# NDK
167+
obj/
168+
169+
# IntelliJ IDEA
170+
*.iws
171+
/out/
172+
173+
# User-specific configurations
174+
.idea/caches/
175+
.idea/libraries/
176+
.idea/shelf/
177+
.idea/.name
178+
.idea/compiler.xml
179+
.idea/copyright/profiles_settings.xml
180+
.idea/encodings.xml
181+
.idea/misc.xml
182+
.idea/scopes/scope_settings.xml
183+
.idea/vcs.xml
184+
.idea/jsLibraryMappings.xml
185+
.idea/datasources.xml
186+
.idea/dataSources.ids
187+
.idea/sqlDataSources.xml
188+
.idea/dynamic.xml
189+
.idea/uiDesigner.xml
190+
191+
# OS-specific files
192+
.DS_Store
193+
.DS_Store?
194+
._*
195+
.Spotlight-V100
196+
.Trashes
197+
ehthumbs.db
198+
Thumbs.db
199+
200+
# Legacy Eclipse project files
201+
.classpath
202+
.project
203+
.cproject
204+
.settings/
205+
206+
# Mobile Tools for Java (J2ME)
207+
208+
# Package Files #
209+
210+
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
211+
212+
## Plugin-specific files:
213+
214+
# mpeltonen/sbt-idea plugin
215+
.idea_modules/
216+
217+
# JIRA plugin
218+
atlassian-ide-plugin.xml
219+
220+
# Mongo Explorer plugin
221+
.idea/mongoSettings.xml
222+
223+
# Crashlytics plugin (for Android Studio and IntelliJ)
224+
com_crashlytics_export_strings.xml
225+
crashlytics.properties
226+
crashlytics-build.properties
227+
fabric.properties
228+
229+
### AndroidStudio Patch ###
230+
231+
!/gradle/wrapper/gradle-wrapper.jar
232+
233+
# End of https://www.gitignore.io/api/java,kotlin,android,androidstudio

.idea/codeStyles/Project.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.

.idea/codeStyles/codeStyleConfig.xml

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

.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.

app/.gitignore

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

app/build.gradle

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

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
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.stevechulsdev.network
2+
3+
import androidx.test.InstrumentationRegistry
4+
import androidx.test.runner.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getTargetContext()
22+
assertEquals("com.stevechulsdev.scnetwork", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.stevechulsdev.network">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity android:name="com.stevechulsdev.network.MainActivity">
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN"/>
15+
16+
<category android:name="android.intent.category.LAUNCHER"/>
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.stevechulsdev.network
2+
3+
import androidx.appcompat.app.AppCompatActivity
4+
import android.os.Bundle
5+
import android.widget.Toast
6+
7+
class MainActivity : AppCompatActivity() {
8+
9+
override fun onCreate(savedInstanceState: Bundle?) {
10+
super.onCreate(savedInstanceState)
11+
setContentView(R.layout.activity_main)
12+
13+
Toast.makeText(this, ScNetwork.isConnectNetwork(this).toString(), Toast.LENGTH_SHORT).show()
14+
}
15+
}

0 commit comments

Comments
 (0)