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

Adding Proguard annotation. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
95 changes: 51 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
buildscript {
ext.kotlin_version = '1.2.70'
ext.kotlin_version = '1.3.72'

repositories {
mavenCentral()
}
repositories {
mavenCentral()
jcenter()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

plugins { id "com.jfrog.bintray" version "1.8.1" }
plugins {
id "com.jfrog.bintray" version "1.8.1"
}

//apply plugin: 'java'
apply plugin: 'kotlin'
Expand All @@ -19,72 +22,76 @@ apply plugin: 'maven-publish'


repositories {
mavenCentral()
jcenter()
mavenCentral()
jcenter()
}

group = 'com.github.holgerbrandl'
version = '1.4'
version = '1.5'

// should not be needed
//dependencies {
// compileOnly "org.jetbrains.kotlin:kotlin-stdlib"
//}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
archives sourcesJar
archives javadocJar
}

publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar { classifier "sources" }
artifact javadocJar
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar { classifier "sources" }
artifact javadocJar
// artifactId = 'kscript-annotations'
}
}
}
}


if (hasProperty('bintray_user') && hasProperty('bintray_key')) {
bintray {
bintray {

// property must be set in ~/.gradle/gradle.properties
user = bintray_user
key = bintray_key
// property must be set in ~/.gradle/gradle.properties
user = bintray_user
key = bintray_key

publications = ['maven'] //When uploading configuration files
publications = ['maven'] //When uploading configuration files

dryRun = false //Whether to run this as dry-run, without deploying
publish = true // If version should be auto published after an upload
dryRun = false //Whether to run this as dry-run, without deploying
publish = true // If version should be auto published after an upload

pkg {
repo = 'github'
name = 'kscript-annotations'
vcsUrl = 'https://github.com/holgerbrandl/kscript-annotations'
pkg {
repo = 'github'
name = 'kscript-annotations'
vcsUrl = 'https://github.com/holgerbrandl/kscript-annotations'

licenses = ['MIT']
publicDownloadNumbers = true
licenses = ['MIT']
publicDownloadNumbers = true

//Optional version descriptor
version {
name = project.version //Bintray logical version name
desc = '.'
released = new Date()
vcsTag = 'v' + project.version
}
}
//Optional version descriptor
version {
name = project.version //Bintray logical version name
desc = '.'
released = new Date()
vcsTag = 'v' + project.version
}
}
}
}

dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib")
}
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

##
## Release Steps For new Annotation Support Libary Version
## Release Steps For new Annotation Support Library Version
##

export KANNOT_HOME="/d/projects/misc/kscript-annotations";
Expand Down
6 changes: 6 additions & 0 deletions src/main/kotlin/ScriptDirectives.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ annotation class KotlinOpts(val runOptions: String)
@Repeatable
annotation class CompilerOpts(val kotlincFlags: String)

@Target(AnnotationTarget.FILE)
@Retention(AnnotationRetention.SOURCE)
@MustBeDocumented
@Repeatable
annotation class ProguardConfig(val proguardConfig: String)


// MavenRepository and DependsOnMaven are supported "as it" for compatibility with jupyter notebooks.
// see https://github.com/kohesive/keplin/blob/master/keplin-maven-resolver/src/main/kotlin/uy/kohesive/keplin/kotlin/script/resolver/maven/MavenResolverAnnotations.kt
Expand Down