Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4 update to kotlin 1.5.20 and gradle 0.7.2 #5

Merged
merged 9 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Build K/N cache
run: ./gradlew :tensorflow:runCommonizer
- name: Check library
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
- name: Install pods with kotlin
run: cd sample/ios-app && pod install
- name: build ios sample
run: cd sample/ios-app && xcodebuild -scheme tensorflow-test -workspace tensorflow-test.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
run: cd sample/ios-app && set -o pipefail && xcodebuild -scheme tensorflow-test -workspace tensorflow-test.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Cocoapods install
run: (cd sample/ios-app && pod install)
- name: Build K/N cache
run: ./gradlew :tensorflow:runCommonizer
- name: Publish library
run: ./gradlew publish
release:
Expand All @@ -44,6 +42,6 @@ jobs:
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true
110 changes: 5 additions & 105 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import java.util.Base64

plugins {
plugin(Deps.Plugins.detekt) apply false
}

buildscript {
repositories {
mavenCentral()
Expand All @@ -21,110 +15,16 @@ buildscript {
}
}
dependencies {
with(Deps.Plugins) {
listOf(
androidApplication,
androidLibrary,
kotlinMultiplatform,
kotlinKapt,
kotlinAndroid,
mokoResources
).forEach { plugin(it) }
}
classpath(":tensorflow-build-logic")
classpath("dev.icerock.moko:resources-generator:0.16.1")
}
}

allprojects {
repositories {
mavenCentral()
google()

maven { url = uri("https://jitpack.io") }
maven { url = uri("http://dl.bintray.com/lukaville/maven") }

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
includeGroup("org.jetbrains.kotlinx")
includeGroup("org.tensorflow")
}
}
}

apply(plugin = Deps.Plugins.detekt.id)

configure<io.gitlab.arturbosch.detekt.extensions.DetektExtension> {
toolVersion = Versions.detekt
input.setFrom("src/commonMain/kotlin", "src/androidMain/kotlin", "src/iosMain/kotlin")
}

dependencies {
"detektPlugins"(Deps.Libs.Jvm.detektFormatting)
}

plugins.withId(Deps.Plugins.mavenPublish.id) {
allprojects {
plugins.withId("org.gradle.maven-publish") {
group = "dev.icerock.moko"
version = Versions.Libs.MultiPlatform.mokoTensorflow

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

configure<PublishingExtension> {
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
name = "OSSRH"

credentials {
username = System.getenv("OSSRH_USER")
password = System.getenv("OSSRH_KEY")
}
}

publications.withType<MavenPublication> {
// Stub javadoc.jar artifact
artifact(javadocJar.get())

// Provide artifacts information requited by Maven Central
pom {
name.set("MOKO tensorflow")
description.set("Tensorflow Lite bindings for mobile (android & ios) Kotlin Multiplatform development")
url.set("https://github.com/icerockdev/moko-tensorflow")
licenses {
license {
url.set("https://github.com/icerockdev/moko-tensorflow/blob/master/LICENSE.md")
}
}

developers {
developer {
id.set("Tetraquark")
name.set("Vladislav Areshkin")
email.set("vareshkin@icerockdev.com")
}
}

scm {
connection.set("scm:git:ssh://github.com/icerockdev/moko-tensorflow.git")
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-tensorflow.git")
url.set("https://github.com/icerockdev/moko-tensorflow")
}
}
}

apply(plugin = Deps.Plugins.signing.id)

configure<SigningExtension> {
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
String(Base64.getDecoder().decode(base64Key))
}
if (signingKeyId != null) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publications)
}
}
}
version = libs.versions.mokoTensorflowVersion.get()
}
}

Expand Down
24 changes: 0 additions & 24 deletions buildSrc/build.gradle.kts

This file was deleted.

82 changes: 0 additions & 82 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

38 changes: 0 additions & 38 deletions buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

28 changes: 28 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[versions]
kotlinVersion = "1.5.20"
mokoResourcesVersion = "0.16.1"
androidVersion = "4.1.1"
appCompatVersion = "1.1.0"
tensorflowLiteVersion = "2.2.0"
mokoTensorflowVersion = "0.2.0"
mokoMediaVersion = "0.9.0"
coroutinesVersion = "1.5.0-native-mt"
constraintLayoutVersion = "1.1.3"
coreKtxVersion = "1.1.0"
playServicesVersion = "17.0.0"
androidDrawVersion = "v0.1"
lifecycleRuntimeVersion = "2.2.0"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompatVersion" }
kotlinStdLib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlinVersion" }
constraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintLayoutVersion" }
coreKtx = { module = "androidx.core:core-ktx", version.ref = "coreKtxVersion" }
playServices = { module = "com.google.android.gms:play-services-tasks", version.ref = "playServicesVersion" }
androidDraw = { module = "com.github.divyanshub024:AndroidDraw", version.ref = "androidDrawVersion" }
tensorflowLite = { module = "org.tensorflow:tensorflow-lite", version.ref = "tensorflowLiteVersion" }
mokoTensorflow = { module = "dev.icerock.moko:tensorflow", version.ref = "mokoTensorflowVersion" }
mokoResources = { module = "dev.icerock.moko:resources", version.ref = "mokoResourcesVersion" }
mokoMedia = { module = "dev.icerock.moko:media", version.ref = "mokoMediaVersion" }
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutinesVersion" }
lifecycleRuntime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeVersion" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
Loading