Skip to content

Commit 21c4884

Browse files
authored
Initial commit
0 parents  commit 21c4884

17 files changed

+757
-0
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: amirisback
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: amirisback
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: https://saweria.co/amirisback

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Main CI
2+
on:
3+
# Triggers the workflow on push or pull request events but only for default and protected branches
4+
5+
workflow_dispatch:
6+
# The workflow will be dispatched to the default queue
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
# Set Current Date As Env Variable
17+
- name: Set current date as env variable
18+
run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
19+
20+
# Set Repository Name As Env Variable
21+
- name: Set repository name as env variable
22+
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23+
24+
- name: Set Up JDK
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'zulu' # See 'Supported distributions' for available options
28+
java-version: '17'
29+
cache: 'gradle'
30+
31+
- name: Change wrapper permissions
32+
run: chmod +x ./gradlew
33+
34+
# Run Tests Build
35+
- name: Run gradle tests
36+
run: ./gradlew test
37+
38+
# Run Build Project
39+
- name: Build gradle project
40+
run: ./gradlew build
41+
42+
# Run main using gradle
43+
- name: Run Main
44+
run: ./gradlew runMainKotlin

.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store
43+
44+
/.gradle
45+
.idea
46+
/local.properties
47+
/.idea/libraries
48+
/.idea/modules.xml
49+
/.idea/workspace.xml
50+
build
51+
/build
52+
/captures
53+
.externalNativeBuild
54+
55+
built application files
56+
.apk
57+
.ap_
58+
59+
files for the dex VM
60+
*.dex
61+
62+
Java class files
63+
*.class
64+
65+
generated files
66+
gen/
67+
.externalNativeBuild/
68+
69+
Local configuration file (sdk path, etc)
70+
local.properties
71+
app/version.properties
72+
73+
# SonarQube
74+
.sonar/

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at faisalamircs@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Compile and Run Kotlin / Java Using Github Action
2+
[![Main CI](https://github.com/amirisback/compile-run-kotlin-java-using-github-action/actions/workflows/ci.yml/badge.svg)](https://github.com/amirisback/compile-run-kotlin-java-using-github-action/actions/workflows/ci.yml)
3+
4+
### Tools
5+
- Intellij IDEA
6+
- Kotlin v 1.8.0
7+
8+
## Screen Shot
9+
![ss](docs/image/ss-1.png?raw=true)
10+
11+
## How To Use
12+
### Step 1 : Create task on build.gradle.kts
13+
- Create Task and Register to build.gradle.kts like below
14+
- Sample Task Name : runMainKotlin
15+
- Detail [Click Here](https://github.com/amirisback/compile-run-kotlin-java-using-github-action/blob/master/build.gradle.kts)
16+
```kts
17+
tasks.register ("runMainKotlin", JavaExec::class.java) {
18+
description = "Compile and Run Main Kotlin"
19+
classpath = sourceSets["main"].runtimeClasspath
20+
// note the addition of "Kt" on the end of the class name.
21+
22+
// package name
23+
mainClass.set("io.github.amirisback.MainKt")
24+
}
25+
```
26+
27+
### Step 2 : Add to CI.yml
28+
- Call the function that has been created in the build.gradle.kts file
29+
- Sample Function : runMainKotlin
30+
- Detail [Click Here](https://github.com/amirisback/compile-run-kotlin-java-using-github-action/blob/master/.github/workflows/ci.yml)
31+
```yml
32+
# Run main using gradle
33+
- name: Run Main
34+
run: ./gradlew runMainKotlin
35+
```
36+
37+
### Step 3 : Run On Github Action
38+
- Open Github Action On Github
39+
40+
![ss](docs/image/ss-2.png?raw=true)
41+
42+
## Colaborator
43+
Very open to anyone, I'll write your name under this, please contribute by sending an email to me
44+
45+
- Mail To faisalamircs@gmail.com
46+
- Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name]
47+
- Example : Github_amirisback_kotlin_admob-helper-implementation
48+
49+
Name Of Contribute
50+
- Muhammad Faisal Amir
51+
- Waiting List
52+
- Waiting List
53+
54+
Waiting for your contribute
55+
56+
## Attention !!!
57+
- Please enjoy and don't forget fork and give a star
58+
- Don't Forget Follow My Github Account

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| 5.1.x | :white_check_mark: |
11+
| 5.0.x | :x: |
12+
| 4.0.x | :white_check_mark: |
13+
| < 4.0 | :x: |
14+
15+
## Reporting a Vulnerability
16+
17+
Use this section to tell people how to report a vulnerability.
18+
19+
Tell them where to go, how often they can expect to get an update on a
20+
reported vulnerability, what to expect if the vulnerability is accepted or
21+
declined, etc.

build.gradle.kts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
plugins {
2+
kotlin("jvm") version "2.0.21"
3+
}
4+
5+
group = "io.github.amirisback"
6+
version = "1.0-SNAPSHOT"
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
testImplementation(kotlin("test"))
14+
}
15+
16+
tasks.test {
17+
useJUnitPlatform()
18+
}
19+
20+
kotlin {
21+
jvmToolchain(17)
22+
}
23+
24+
tasks.register ("runMainKotlin", JavaExec::class.java) {
25+
description = "Compile and Run Main Kotlin"
26+
classpath = sourceSets["main"].runtimeClasspath
27+
// note the addition of "Kt" on the end of the class name.
28+
29+
mainClass.set("io.github.amirisback.MainKt")
30+
}

docs/image/ss-1.png

105 KB
Loading

docs/image/ss-2.png

135 KB
Loading

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)