-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix kotlin multiplatform and added an example * Removed android target source at this moment * Remove unnecessary iOS project in multiplatform example * Fix travis file and added next release * Add android to travis * Fix kotlin-example * Remove unnecessary repositories * Fix Travis CI integration (#9) * Update travis file * Add licenses configuration * Add missing build tool * Apply review suggestions
- Loading branch information
1 parent
e3ea934
commit 93a89b3
Showing
51 changed files
with
766 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
language: java | ||
|
||
jdk: | ||
- oraclejdk11 | ||
language: android | ||
dist: trusty | ||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
- build-tools-28.0.0-rc02 | ||
- build-tools-28.0.3 | ||
- build-tools-27.0.3 | ||
- android-27 | ||
- android-28 | ||
- extra-android-support | ||
- extra-google-m2repository | ||
- extra-android-m2repository | ||
licenses: | ||
- 'android-sdk-preview-license-52d11cd2' | ||
- 'android-sdk-license-.+' | ||
- 'google-gdk-license-.+' | ||
|
||
script: | ||
- ./gradlew ktlint test install --info | ||
- ./gradlew install | ||
- cd example | ||
- cd examples/kotlin-example | ||
- ./gradlew test --info | ||
- cd ../multiplatform-example | ||
- ./gradlew test --info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,5 @@ buildscript { | |
|
||
allprojects { | ||
group 'com.karumi.hagu' | ||
version '0.1.1' | ||
} | ||
version '0.1.3-SNAPSHOT' | ||
} |
0
example/.gitignore → examples/kotlin-example/.gitignore
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0
example/gradlew.bat → examples/kotlin-example/gradlew.bat
100644 → 100755
File renamed without changes.
0
example/settings.gradle → examples/kotlin-example/settings.gradle
100644 → 100755
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
logs | ||
target | ||
/.idea | ||
/.idea_modules | ||
/.classpath | ||
/.project | ||
/.settings | ||
.vscode | ||
/RUNNING_PID | ||
**/.DS_Store | ||
.gradle/ | ||
build | ||
out/ | ||
.kotlintest | ||
local.properties | ||
*.iml | ||
*/Pods | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_7 | ||
targetCompatibility JavaVersion.VERSION_1_7 | ||
} | ||
|
||
lintOptions { | ||
textOutput 'stdout' | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 28 | ||
|
||
applicationId 'com.example.karumi.hagu' | ||
|
||
versionCode 1 | ||
versionName '1.0' | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
applicationIdSuffix '.development' | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation project(':shared') | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | ||
implementation "com.android.support:appcompat-v7:28.0.0" | ||
|
||
testImplementation group: 'junit', name: 'junit', version: '4.12' | ||
} |
20 changes: 20 additions & 0 deletions
20
examples/multiplatform-example/android/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.karumi.hagu"> | ||
|
||
<application | ||
android:label="@string/app_name" | ||
android:allowBackup="false" | ||
android:icon="@mipmap/ic_launcher"> | ||
<activity | ||
android:name=".MainActivity" | ||
> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
|
||
<category android:name="android.intent.category.LAUNCHER"/> | ||
<category android:name="android.intent.category.DEFAULT"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
15 changes: 15 additions & 0 deletions
15
examples/multiplatform-example/android/src/main/java/com/example/karumi/hagu/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.example.karumi.hagu | ||
|
||
import android.os.Bundle | ||
import android.support.v7.app.AppCompatActivity | ||
import android.widget.TextView | ||
import com.karumi.hagu.generated.HaguConfig | ||
|
||
class MainActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.main_activity) | ||
|
||
findViewById<TextView>(R.id.messageTextView).text = "$HaguConfig.API_KEY" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
examples/multiplatform-example/android/src/main/res/layout/main_activity.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/messageTextView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> |
Binary file added
BIN
+2.8 KB
examples/multiplatform-example/android/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.76 KB
examples/multiplatform-example/android/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.3 KB
examples/multiplatform-example/android/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.7 KB
examples/multiplatform-example/android/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11 KB
examples/multiplatform-example/android/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
examples/multiplatform-example/android/src/main/res/values/dimens.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
</resources> |
3 changes: 3 additions & 0 deletions
3
examples/multiplatform-example/android/src/main/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">Hagu example</string> | ||
</resources> |
19 changes: 19 additions & 0 deletions
19
examples/multiplatform-example/android/src/test/java/com/karumi/hagu/AndroidSharedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.karumi.hagu | ||
|
||
import com.karumi.hagu.generated.HaguConfig | ||
|
||
import org.junit.Test | ||
import junit.framework.TestCase.assertEquals | ||
|
||
class AndroidSharedTest { | ||
|
||
@Test | ||
fun `hagu configuration file should be accessible from android`() { | ||
assertEquals("some_api_key", HaguConfig.API_KEY) | ||
} | ||
|
||
@Test | ||
fun `hagu configuration file should contains number key`() { | ||
assertEquals(11, HaguConfig.NUMBER_KEY) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
buildscript { | ||
ext.kotlin_version = '1.3.50' | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url uri("../../repo") } | ||
google() | ||
jcenter() | ||
maven { url 'https://plugins.gradle.org/m2/' } | ||
} | ||
|
||
dependencies { | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
classpath 'com.android.tools.build:gradle:3.5.0' | ||
classpath 'com.karumi.hagu:gradle-plugin:0.1.3-SNAPSHOT' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
google() | ||
jcenter() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kotlin.code.style=official |
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
examples/multiplatform-example/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Wed Sep 25 02:02:28 CEST 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |
Oops, something went wrong.