Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Add tooling to help with binding Kotlin libraries #642

Merged
merged 29 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
25c885b
Add support for Maven Central to Android Binderator
mattleibow Aug 13, 2019
40d3f5e
Add support for metadata
mattleibow Aug 13, 2019
1ec5f0f
Merge commit '8b22847ad0af600aafa1cbe468b93f0584d84eff' into dev/mave…
mattleibow Aug 14, 2019
f92d98d
Initial commit of the Kotlin helper
mattleibow Aug 14, 2019
87c3d33
A bit more work to the tool and added a nuget
mattleibow Aug 15, 2019
de2eeca
Fix the package
mattleibow Aug 15, 2019
d774d7f
Seems we can't pack on CI
mattleibow Aug 15, 2019
b38c1a3
Update Xamarin.Kotlin.BindingSupport.nuspec
mattleibow Aug 15, 2019
7a374f3
Update Xamarin.Kotlin.BindingSupport.nuspec
mattleibow Aug 15, 2019
a748764
Major update to the tool to better understand Kotlin
mattleibow Aug 16, 2019
17142d4
Fix the members
mattleibow Aug 16, 2019
f8fe804
tests
mattleibow Aug 16, 2019
13915b8
metadata
mattleibow Aug 16, 2019
d0c7c05
rn
mattleibow Aug 16, 2019
02b2641
Major fixes
mattleibow Aug 17, 2019
efd0db4
Nearly there!
mattleibow Aug 17, 2019
51bc364
More
mattleibow Aug 17, 2019
26a6f11
Some improvements for Kotlin 1.3
mattleibow Aug 17, 2019
83acf93
More
mattleibow Aug 18, 2019
38360e9
Fix
mattleibow Aug 18, 2019
36a1dcb
Some people name their methods -deprecated_xxx...
mattleibow Aug 18, 2019
cd9d4cd
use license expression
mattleibow Aug 18, 2019
bf519fc
Revert "use license expression"
mattleibow Aug 18, 2019
e5dd8b8
More...
mattleibow Aug 18, 2019
bd35e3b
Some more improvements
mattleibow Aug 19, 2019
ba79791
Copyo
mattleibow Aug 20, 2019
9e705fc
Updated URLs
mattleibow Aug 21, 2019
e438c18
Update Xamarin.Kotlin.BindingSupport.nuspec
mattleibow Aug 23, 2019
6a4046f
Update build.cake
mattleibow Aug 23, 2019
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
11 changes: 11 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The MIT License (MIT)

Copyright (c) .NET Foundation Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

20170823
71 changes: 71 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

var TARGET = Argument("t", Argument("target", "Default"));

var PACKAGE_VERSION = "0.1.0-preview";

Task("externals")
.Does(() =>
{
EnsureDirectoryExists("./externals/");
if (!FileExists("./externals/kotlin-stdlib-1.2.jar"))
DownloadFile(
"https://search.maven.org/remotecontent?filepath=org/jetbrains/kotlin/kotlin-stdlib/1.2.71/kotlin-stdlib-1.2.71.jar",
"./externals/kotlin-stdlib-1.2.jar");
if (!FileExists("./externals/kotlin-stdlib-1.3.jar"))
DownloadFile(
"https://search.maven.org/remotecontent?filepath=org/jetbrains/kotlin/kotlin-stdlib/1.3.41/kotlin-stdlib-1.3.41.jar",
"./externals/kotlin-stdlib-1.3.jar");
});

Task("libs")
.IsDependentOn("externals")
.Does(() =>
{
var gradlew = MakeAbsolute((FilePath)"./native/gradlew");
var exitCode = StartProcess(gradlew, new ProcessSettings {
Arguments = "jar",
WorkingDirectory = "./native/"
});
if (exitCode != 0)
throw new Exception($"Gradle exited with code {exitCode}.");
});

Task("nuget")
.IsDependentOn("libs")
.Does(() =>
{
NuGetPack("./nuget/Xamarin.Kotlin.BindingSupport.nuspec", new NuGetPackSettings {
Version = PACKAGE_VERSION,
OutputDirectory = "./output"
});
});

Task("samples")
.IsDependentOn("nuget")
.Does(() =>
{
var settings = new MSBuildSettings()
.SetConfiguration("Release")
.SetVerbosity(Verbosity.Minimal)
.WithRestore();

MSBuild("./samples/KotlinBindingSupportSample.sln", settings);
});

Task("clean")
.Does(() =>
{
CleanDirectories("./source/bin");
CleanDirectories("./source/obj");
CleanDirectories("./output/");
CleanDirectories("./native/.gradle");
CleanDirectories("./native/**/build");
});

Task("Default")
.IsDependentOn("externals")
.IsDependentOn("libs")
.IsDependentOn("nuget")
.IsDependentOn("samples");

RunTarget(TARGET);
2 changes: 2 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.gradle
build
1 change: 1 addition & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 110 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions Util/Xamarin.Kotlin.BindingSupport/native/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
}

group 'xamarin.binding.kotlin'
version '1.0'

sourceCompatibility = 1.8

repositories {
mavenCentral()
}

dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
compile 'com.github.ajalt:clikt:2.1.0'
compile 'xom:xom:1.3.2'
compile 'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:1.3.41"
compile "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
}

compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}

jar {
manifest {
attributes 'Main-Class': 'xamarin.binding.kotlin.bindingsupport.ProgramKt',
'Implementation-Version': version
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Aug 15 01:51:33 SAST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading